- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2019 11:19 AM
We are reverting our Change module back to OOTB. I am looking at the "Revert to New" UI Action.
According to the documentation:
Note: When you revert to New from the Assess state or the Authorized state, the workflow is restarted and all pending approvals are cancelled.
I do see this happening, but when approval is requested again on the same CR (Request Approval - Assess is clicked), the approvals are not recreated.
Digging into the code, I see in the script include "ChangeRequestSNC" that upon revert:
/**
* Revert the Change Request to New by invoking the state model handler
* Delete the workflow context associated to the current change type
*
* Return false if the state model does not allow the modification
* Return true (and clear the On Hold field) if the Change Request has been successfully reverted to New
*/
revertToNew: function() {
this.setNew();
if (!this.changesToNew())
return false;
this.deleteDefaultWorkflowContext();
this.setValue('on_hold', false);
this.update();
return true;
},
If the workflow is actually deleted, then the approvals ARE reset. But the workflow isn't being deleted.
I wonder if the script include can't identify the workflow. I did make a copy of the OOTB workflow to customize it. But since the workflow is starting correctly, this seems like a stretch.
I don't know why else the workflow wouldn't be deleted. Does anyone know what's happening here?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2019 08:14 AM
This works correctly with the out of box workflow named: Change Request - Normal
I made a copy of that workflow and added v2 to the name, then I inactivated the out of box one. Trying Revert to New again, it did Cancel the approvals but did not reset my workflow.
I'd recommend you try using the out of box workflow or change the name on your custom workflow to Change Request - Normal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2019 08:14 AM
This works correctly with the out of box workflow named: Change Request - Normal
I made a copy of that workflow and added v2 to the name, then I inactivated the out of box one. Trying Revert to New again, it did Cancel the approvals but did not reset my workflow.
I'd recommend you try using the out of box workflow or change the name on your custom workflow to Change Request - Normal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2019 10:25 AM
Thanks!
Renaming the workflow did the trick.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2020 08:29 AM
I came across this post when searching for a solution to exactly the same issue mentioned here.
On further investigation I found that the default workflows for the different change types are stated at the top of the ChangeRequestSNC script include:
EMERGENCY_WORKFLOW: "Change Request - Emergency",
STANDARD_WORKFLOW: "Change Request - Standard",
NORMAL_WORKFLOW: "Change Request - Normal",
You can override these values via the ChangeRequest script include. See line 9 below:
var ChangeRequest = Class.create();
ChangeRequest.NORMAL = "normal";
ChangeRequest.STANDARD = "standard";
ChangeRequest.EMERGENCY = "emergency";
ChangeRequest.CHANGE_REQUEST = "change_request";
ChangeRequest.prototype = Object.extendsObject(ChangeRequestSNC, {
NORMAL_WORKFLOW: "Change Request - Normal V2",
type: "ChangeRequest"
});
ChangeRequest.newNormal = ChangeRequestSNC.newNormal;
ChangeRequest.newStandard = ChangeRequestSNC.newStandard;
ChangeRequest.newEmergency = ChangeRequestSNC.newEmergency;
ChangeRequest.newChange = ChangeRequestSNC.newChange;
On making this change the 'Revert to New' UI action works as expected with the custom workflow.
Hope this is helpful for anyone experiencing the same issue.