
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-02-2020 02:08 PM
Discovered Cases where there is a need to Revert a Normal Change that failed to be executed and the State is Scheduled or even Implement, and the desire is to allow Support to Reset / Revert the Change back to New so it can be Rescheduled and go thru the Approval Process again.
Would like to come up with something like Revert to New that works when Change is in Assess.
Is there a Way to use UI Action when the Change Record is in Scheduled or Implement State to Revert to New.
Where when the Change Request was unable to be completed due to Issues and a Back Out Plan occurred the Change Request does not have to be Cancelled.
Solved! Go to Solution.
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2020 02:18 AM
Hi Mark,
If you want to maintain the state model, this can be done by modifying the following:
Modify ChangeRequestStateModel_normal script include and add the following code segment under the states you wish to allow moving back to draft:
draft: {
moving: function() {
return this.toDraft_moving();
},
canMove: function() {
return this.toDraft_canMove();
}
},
As an example, the code for "scheduled" now looks like:
scheduled: {
nextState: [ "implement" ],
draft: {
moving: function() {
return this.toDraft_moving();
},
canMove: function() {
return this.toDraft_canMove();
}
},
implement: {
moving: function() {
return this.toImplement_moving();
},
canMove: function() {
return this.toImplement_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
Update the UI Action "Revert to New" so the condition looks like:
gs.hasRole("itil,sn_change_write") && ((current.type == ChangeRequest.EMERGENCY && new ChangeRequest(current).isAuthorize()) || (current.type == ChangeRequest.NORMAL && (new ChangeRequest(current).isAssess() || new ChangeRequest(current).isImplement() || new ChangeRequest(current).isScheduled())))
You'll likely need to move the condition into its own script include due to the length or change the max length attribute field to accept more than 254 characters.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-03-2020 02:18 AM
Hi Mark,
If you want to maintain the state model, this can be done by modifying the following:
Modify ChangeRequestStateModel_normal script include and add the following code segment under the states you wish to allow moving back to draft:
draft: {
moving: function() {
return this.toDraft_moving();
},
canMove: function() {
return this.toDraft_canMove();
}
},
As an example, the code for "scheduled" now looks like:
scheduled: {
nextState: [ "implement" ],
draft: {
moving: function() {
return this.toDraft_moving();
},
canMove: function() {
return this.toDraft_canMove();
}
},
implement: {
moving: function() {
return this.toImplement_moving();
},
canMove: function() {
return this.toImplement_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
Update the UI Action "Revert to New" so the condition looks like:
gs.hasRole("itil,sn_change_write") && ((current.type == ChangeRequest.EMERGENCY && new ChangeRequest(current).isAuthorize()) || (current.type == ChangeRequest.NORMAL && (new ChangeRequest(current).isAssess() || new ChangeRequest(current).isImplement() || new ChangeRequest(current).isScheduled())))
You'll likely need to move the condition into its own script include due to the length or change the max length attribute field to accept more than 254 characters.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2021 05:21 PM
Hey Kieran, thx for this but I have an issue. We currently have a Normal change workflow that has 2 approvals (Peer/Technical Review and CAB Approval).
When I run the "Revert to New" UI against a change the change gets reset to "New" and the existing approvals (if any) get "Cancelled". However, when I go to "Request Approvals" again, the first set of requested approvals should be the "Peer/Technical Review". Unfortunately the change is moving to the request fo the CAB approval and skipping the Peer/Technical approval.
I followed your instructions above and updated the UI action "Revert to New" to allow it to revert Normal-Assess or Authorize as a test:
gs.hasRole("itil,sn_change_write") && ((current.type == ChangeRequest.NORMAL && new ChangeRequest(current).isAssess()) || (current.type == ChangeRequest.NORMAL && new ChangeRequest(current).isAuthorize()))
What am I missing here? If I "Revert to New" and either change the state to "Assess", or "Request Approval" UI it automatically moves to the CAB approval.
thx for any help you may give on this.
I want to be able to "reset" any change due to errors, business need or whatever from the following states: Assess, Authorize, Implement, OnHold for example.
Thx in advance!
Ray

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-27-2021 11:12 PM
Hi Ray,
What version of the platform are you on? Are you using the legacy workflow model for change management or have you migrated to flow designer? When you revert to new, is a new workflow attached (can use the workflow context related link action to view) or is the same one paused at the pre-CAB approval activity?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2021 06:58 PM
Hey Kieran, thx for the response.
We are running on Paris, using the workflow editor. I have been doing this for only about a year, so still new, never used the Flow Designer.
I actually was able to get the "Revert To New" UI Action working adn it seems to be functioning properly now. It seems to have issues with "older" changes versus "new" ones I create and test. The only thing it is not doing is lets say the first group approval is "approved" and then I "Revert to New". All the approvals are "canceled" but the one that had been approved, still remains in the list as "Approved".
I can get the workflow to continue as normal starting over but I have to delete that remaining approval manually.