Change Request got cancelled but it is still showing up as needing approval in approvers queue

Vasavi O
Tera Contributor

Hi,

Change request was cancelled but it is still showing up as needing approval in approvers queue. It should not be in the approvers queue . What Can I do to make  disappear those in approvers queue automatically, those  are in requested state now , what type of script do I need to write for not showing in queue?

4 REPLIES 4

Mahendra RC
Mega Sage

Hi @Vasavi O 

You can create after update BR on change_request table that will run once the Change request is cancelled:

(function executeRule(current, previous /*null when async*/) {
   var workflow = new Workflow();
   //cancel all my workflows
   var numCnxd = workflow.cancel(current);
   if (numCnxd > 1)
      gs.addInfoMessage(gs.getMessage("{0} Workflows for {1} have been cancelled", numCnxd, current.getDisplayValue()));
   else if (numCnxd == 1)
      gs.addInfoMessage(gs.getMessage("1 Workflow for {0} has been cancelled", current.getDisplayValue()));
})(current, previous);

@Mahendra RC Hi Mahendra, the change request was already canceled , but it is still showing up in approvers queue it is currently  in requested state. How can we change the state of requests as No longer required so that they will be removed automatically in the approvers queue. Could you please share if you have any fix script for that ?

Vasavi O
Tera Contributor

@Mahendra RC Hi Mahendra, the change was cancelled but it is still showing in approvers queue as needing approval even it was cancelled already, It is in "requested" state currently how to change the state as "no longer required" so may be  it will be removed from approvers queue. if you have Could you please share the fix script regarding this ?

 

Vasavi O
Tera Contributor

@Mahendra RC Hi Mahendra, the change was cancelled but it is still showing in approvers queue as needing approval even it was cancelled already, It is in "requested" state currently how to change the state as "no longer required" so that it will be removed from approvers queue. if you have Could you please share the fix script regarding this ?