How do I copy the short description & description fields from a CHG Request over to a Change Task?

bradschamerloh
Kilo Expert

I've built a Change Request WF that after manager approval, creates a Change Task.   I need to copy over the Short Description & Description fields over to the Change Task.

Change request:

find_real_file.png

Change Task:

find_real_file.png

I've attempted to create a couple Business Rules and even a "Run Script" Activity within the WF and nothing seems to carry over

Business Rule's I've tried:

current.changetask.description = current.gen_request.GetDisplayValue();

}

current.changetask.description = current.description.GetDisplayValue();

}

Run Script Activity:

var gr = new GlideRecord('change_task');

gr.addQuery('change_request', current.sys_id);

gr.query();

if (gr.next()){

gr.description = current.description;

gr.update();

}

1 ACCEPTED SOLUTION

Correction. The answer is in the script comments when you click Advanced


find_real_file.png


View solution in original post

5 REPLIES 5

vic
Tera Contributor

Hey there, im hoping to get some help as i am needing to carry the description from 1 task to another task, im using a advanced script in the task in the wf, but i dont have any luck, i put this script in the second task, any help i can get on this?

btw this is a "change_task"

var task = new GlideRecord('change_task');
task.addQuery('f469a466db6c70106318810439961984', change_task);
task.query();
while(task.next()) {
task.description = current._description;;
current.update();
}