- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2018 09:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2018 05:49 AM
Hi leahp
In the create change task choose set values and set your state and initial assignment group etc then go to the advanced section
Tick the advanced box
Add the line
workflow.scratchpad.sys_id = task.sys_id;
What this does is passes the sysID of the created change to the scratchpad
Then go to your change task script and in the advanced section add
var sys_id = workflow.scratchpad.sys_id;
task.change_request = sys_id;
What this does is retrieves the sysID of the Change you created and sets the change task change_request field with it.
I mocked this up like yours and it creates fine
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2018 05:49 AM
Hi leahp
In the create change task choose set values and set your state and initial assignment group etc then go to the advanced section
Tick the advanced box
Add the line
workflow.scratchpad.sys_id = task.sys_id;
What this does is passes the sysID of the created change to the scratchpad
Then go to your change task script and in the advanced section add
var sys_id = workflow.scratchpad.sys_id;
task.change_request = sys_id;
What this does is retrieves the sysID of the Change you created and sets the change task change_request field with it.
I mocked this up like yours and it creates fine
Hope this helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2018 06:04 AM
Apologies I wasn't clear what I was saying
For for the other stuff it's about passing the data from the change, as strings, to the scratchpad then retrieving the values in the change_task script.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2018 09:14 PM
Thank you! that worked like a charm!
I have a workflow that will create a change request when a catalog task closes. In addition to the change request, I need for it to open a change task, propagating specific information from the change request to the change task, specifically the fields listed below:
Configuration Item
Change Request #
Company
Short Description
Assignment Group
Assigned To
Set due date to 5 days out.
Below is script I have. The only thing working is the due date.
task.change_request = current.getValue('sys_id');
task.cmdb_ci = current.getValue('cmdb_ci');
task.assignment_group = current.assignment_group;
task.assigned_to = current.getValue('assigned_to');
task.short_desccription = current.short_descrirption;
task.company = current.getValue('company');
task.u_category = 'Hardware';
thoughts?