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. 



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:
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()
   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')]));
   changeRequest.setValue('on_hold', false);
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

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2020-11-16 13:00:51