Hi All,
I have a workflow button "In progress" which helps me to move forward in the ticket life cycle.
In the workflow post function: I want 2 things to happen:
1) Update a Select list based on a condition: I am using below script for this:
cf.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(cf), option), changeHolder);
2) Since I am using 5 select lists, based on their values, i need to move ticket to a particular stage in workflow, say "Intermediate". I am using the below script for this:
WorkflowTransitionUtil workflowTransitionUtil = JiraUtils.loadComponent(WorkflowTransitionUtilImpl.class);
workflowTransitionUtil.setIssue((MutableIssue)issue);
workflowTransitionUtil.setUserkey(currentUser.getKey());
workflowTransitionUtil.setAction(301);
if (workflowTransitionUtil.validate().getErrorMessages().size() == 0)
{
workflowTransitionUtil.progress();
}
2 scripts in my post function, however to execute them both, I need to press "In progress" button twice in my Ticket view window.
Am i missing something ? is there way to combine both the scripts to 1 to avoid pressing the button twice?
Please help