Creating Change Request from Incident

Jan-Z
Giga Expert

When creating a change from an incident, once the change is created from the incident the change number appears on the incident under related records.
Our ITIL users are having a hard time finding the change number in this location so we would like the change number to also appear under the related list Change Requests.

Currently the change number is being manually added to the Change Requests related list, is it possible to automate?

I have looked all over the WIKI and in the forums with no luck. Any suggestions would be appreciated.

2 REPLIES 2

Not applicable

If you modify the UI Action 'Create Change' and add the line of code 'change.parent = current.sys_id;' then your newly created change also ends up under related changes.

Modified UI Action script 'Create Change':

var change = new GlideRecord("change_request");
change.short_description = current.short_description;
change.description = current.description;
change.cmdb_ci = current.cmdb_ci;
change.priority = current.priority;
change.parent = current.sys_id; ===================> new relationship through related changes tab
var sysID = change.insert();

current.rfc = sysID; ===================> out of the box relationship through rfc field
var mySysID = current.update();

gs.addInfoMessage("Change " + change.number + " created");
action.setRedirectURL(change);
action.setReturnURL(current);


Jan-Z
Giga Expert

I tested this out and it works as I need it to.

Thank you Laurens for taking the time to post.
Much appreciated.