109 views

Description

When reverting to new a Change Request which has the value of the On Hold field checked as true, the On Hold Field is not cleared out and hidden from the form, leaving the change locked on hold.

 

Steps to Reproduce

  1. Login an early Kingston instance.
  2. Create a normal change request, filling out all mandatory fields.
  3. Click on Request Approval.
  4. Check the box for "On hold" and save the change.
  5. Click on the top-left hamburger icon and Click on "Revert to new". Notice the change will go back to the "New" state. 

 

Workaround

This problem was fixed in Kingston Patch 6.
As a workaround on earlier releases, navigate to the UI Action named Revert to New [sys_id=ff915528675b32006e6eadab9485ef3a], change the Script field to be as shown in the below code:
 
revertToNew(current);
action.setRedirectURL(current);
 
function revertToNew(changeRequestGr) {
   var changeRequest = new ChangeRequest(changeRequestGr);
   // try to set state to new. Using setNew() will only change state if state model allows it. Note that record is not updated until calling update()
   changeRequest.setNew();
   if (!changeRequest.changesToNew()){
      gs.addErrorMessage(gs.getMessage('State Model for {0} changes does not allow reverting change from {1} state', [changeRequest.getValue('type'), changeRequest.getDisplayValue('state')]));
      return;
   }
   changeRequest.setValue('on_hold', false);
   changeRequest.update();
}
 
Notice in bold the code added for this workaround.
 
After applying the workaround, make sure the Customer Update record in sys_update_xml for the above mentioned UI Action is removed, to avoid the component to get skipped during the fix upgrade.
 

Related Problem: PRB1262255

Seen In

There is no data to report.

Fixed In

Kingston Patch 6
London

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-06-28 02:04:00
Published:2018-06-28