when an incident is resolved by fixed by change . Change number is not showing up in fixed by change field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 01:17 PM
when an incident is resolved by fixed by change . Change number is not showing up in fixed by change field.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2022 02:13 PM
hello update your br to below script
i hope your br is on change request form and i have added one line to update fixed by change
gr.your_fixed_by_change_field_backend_name=current.sys_id;
function executeRule(current, previous /*null when async*/ ) {
gs.log('abc' + current.sys_id);
var gr = new GlideRecord("incident");
gr.addQuery("rfc", current.sys_id);
//gr.addQuery("state", 4); // incident state 4 is pending change
gr.query();
while (gr.next()) {
gs.log('abc 123' + gr.number);
// resolve the incident
gr.state = 6; // OOB, resolved is 6
gr.your_fixed_by_change_field_backend_name=current.sys_id;
// add some canned comments to the resolved incident
//gr.description = "This incident has been resolved due to the successful implementation of change request " + current.number;
// gr.rfc = current.short_description;
gr.update();
}
})(current, previous);
PLEASE MARK MY ANSWER CORRECT IF THIS HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 05:33 AM
hello , what is your BR trigger condition and on which table it is configured ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 05:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 05:48 AM
make sure "rfc" is the field which is storing the change request and you have used the correct back end name of the field in the below line?
gr.addQuery("rfc", current.sys_id);
Also is the state of incident getting update to resolved ?
please post your script once