Change 'tasks' are getting "Closed incomplete", where this is set?

yogesh15dd
Tera Guru

Hi ,

When i click on "Review" (UI action) button on the emergency change, it automatically closes related tasks   state's as well   to "Closed Incomplete",

i have checked it in many of the change_request and task business rules as well as in emergency workflow, no where i'm able to   find this.

find_real_file.png

any idea?

Thanks

Yogish

5 REPLIES 5

tanumoy
Tera Guru

Check what is written in the Review UI action. Please post the code here so that we can check what is the issue.


Review ui action code:



function moveToReview(){


  var ga = new GlideAjax("ChangeRequestStateHandlerAjax");


  ga.addParam("sysparm_name", "getStateValue");


  ga.addParam("sysparm_state_name", "review");


  ga.getXMLAnswer(function(stateValue) {


  g_form.setValue("state", stateValue);


  gsftSubmit(null, g_form.getFormElement(), "state_model_move_to_review");


  });


}




if (typeof window == 'undefined')


    setRedirect();




function setRedirect() {


      current.update();


      action.setRedirectURL(current);


}


OOTB script includes: ChangeRequestStateHandlerAjax


robbie_williams
Kilo Contributor

I ran into this same issue.   This was out of the box behavior       It appears as though the issue is with the workflow.   Out of the box the "Change Request - Normal" workflow executes.   Eventually it spawns a child workflow "Change Request - Normal change tasks" which opens the 2 tasks.   The main workflow now has 2 paths (one for the child workflow and tasks, as well as a wait for condition widget).   At this point if the user clicks the Review button to change the state of the change before the Tasks are closed, the main workflow branches from the "Wait For Condition" widget to the end of the workflow and thus cancels any open activity in the workflow.   I see 2 solutions the issue.  


  1. Prevent the Review button from displaying while there are open tasks.  
  2. Modify the "Waif for condition" by adding additional constraints before moving to the end of the workflow.  


Hopefully this helps.