Edit "Request Approval" UI Action

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2020 02:27 PM
I am trying to adjust the OOB UI Action for "Request Approval" when the type is set to Emergency. We are adding another layer of approval so that an eCHG first goes to the manager before it hits our eCAB. I am trying to fix the UI Action for when you select Request Approval so that it hits the Assess state vs. going to Authorize but I cannot figure out how to get it to work. I looked in the UI Scripts, Policies, etc. and can't find what other piece to the puzzle I am missing.
I know that it's using the UI Action that references the CAB because when you make it inactive, you can see that "Request Approval" no longer shows up when the Change is selected as Emergency.
Any ideas how to get this to work?
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2020 03:35 PM
Hi Christine,
We're about to go live with Change so I can feel your pain. Before you make yourself crazy in the UI Action, take a look at your workflow. I have a mix of ways that the state transitions happen. For going from New to Assess, yes we use the button. Moving to approve is controlled by the workflow based on the change control group indicating that certain prerequisites are met.
The other benefit of the methodology is that it cuts out the need for UI Action conditions that can quickly start to look really ugly and become hard to manage.
Feel free to come back if you want more clarification on any of the above.
Hope that helps.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
:{)
Helpful and Correct tags are appreciated and help others to find information faster

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2020 03:57 PM
Thanks!
I did adjust the workflow (Change Request - Emergency), but maybe not the right one? I did see there was one for Emergency Change but did not review that. Is that where I can change the UI Action to go to Assess instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 05:39 AM
Hi Christine,
Determination of what is the next state is controlled within the larger change management process. If you look at the script include changeRequestStateModel_emergency you will see that for each state there are two sets of values nextState: tells the process what the next expected is for a change of that type. After that comes a list of other states to which the change can be moved. Here is what the start of the script looks like OOTB:
var ChangeRequestStateModel_emergency = Class.create();
ChangeRequestStateModel_emergency.prototype = Object.extendsObject(ChangeRequestStateModelSNC_emergency, {
draft: {
nextState: [ "authorize" ],
authorize: {
moving: function() {
return this.toAuthorize_moving();
},
canMove: function() {
return this.toAuthorize_canMove();
}
},
scheduled: {
moving: function() {
return this.toScheduled_moving();
},
canMove: function() {
return this.toScheduled_canMove();
}
},
canceled: {
moving: function() {
return this.toCanceled_moving();
},
canMove: function() {
return this.toCanceled_canMove();
}
}
},
Changing next state to assess will appear to address your issue, but you will run into two challenges:
The first is that you will need to add a section for moving from assess to the next state, which I assume will be authorize. Adding that should be pretty straight forward, just remember the commas!
The second can be trickier. The to<state>_moving() and to<state>_canMove() functions are contained in ChangeRequestStateModelSNC_emergency which is an OOTB script. It doesn't have those functions for assess and it's protected so you can't change it. Probably the easiest way around that is to just set up your moving and canMove like this:
draft: {
nextState: [ "assess" ],
assess:{
moving: function() {
return true;
}
canMove: function() [
return true;
]
},
authorize: {
moving: function() {
return this.toAuthorize_moving();
},
canMove: function() {
return this.toAuthorize_canMove();
}
},
I know it gets complicated. Needing to change the OOTB state movement can often mean creating your own change states. Hopefully the above will do what you need.
Don't hesitate if you need clarification on any of the above.
:{)
Helpful and Correct tags are appreciated and help others to find information faster
:{)
Helpful and Correct tags are appreciated and help others to find information faster

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-12-2020 06:05 AM
Thanks! I'll start poking around at this and see how it goes. 🙂