7 views

Description

When one of the Change Request workflows (e.g. Normal, Emergency) is changed while there are Change Requests in-flight, using the 'Revert to New' UI Action does not revert the Change Request to the 'New' state.

Steps to Reproduce

  1. Create a normal change and move it to the assess state.
  2. Change the workflow of the normal change and publish it again.
  3. Navigate to the change created in step 2 and click the UI action 'Revert to New'.


Expected behavior: The change request should be moved to the New state.
Actual behavior: The change request should be moved to the Scheduled state.

Workaround

Add the following method to the ChangeRequest Script Include before the line 'type: "ChangeRequest"':

// Workaround for PRB1261372
_deleteWorkflowContext: function(workflowName) {
    var workflow = new Workflow();
    var wfContext = workflow.getContexts(this._gr);
    while (wfContext.next()) {
        if (wfContext.workflow_version.nil() || wfContext.state+"" !== "executing")
            continue;
			
        var wfVersion = wfContext.workflow_version.getRefRecord();
        if (wfVersion.name + "" === workflowName) {
            wfContext.deleteRecord();
            break;
        }
    }
},

This will replace the method on the OOB script include and can be removed safely be once upgraded to release which includes the for PRB1261372.


Related Problem: PRB1261372

Seen In

There is no data to report.

Fixed In

Kingston Patch 7
London

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-10-11 08:47:18
Published:2018-10-11