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

Chuck Tomasi
Tera Patron

When you create the task in the workflow activity (create task) and specify the table, you can enter a script for the field values. If I recall, it goes like this:



current.description = current.parent.description;


current.short_description = current.parent.short_description;



//untested


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


find_real_file.png


I have no idea how I missed something this simple......I'm going to blame it on overthinking.   Thanks for your help!!


You're not alone. I often over engineer when a simple solution is available. The great thing about this community is that it is VERY educational from complex to simple. Every week I think I learn about some simple feature that has been in the product for years. It's humbling.