We are trying to use the Script Runner post-function 'Transition parent when all subtasks are resolved'.
Issue we are working with has six subtasks. When all subtasks are resolved the issue does not transition. Here is what we are seeing in the logs:
2014-05-08 09:56:53,366 http-bio-8080-exec-11 DEBUG dre 596x240617x1 1jmaxot X.X.X.X,0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [canned.workflow.postfunctions.ResolveParentAfterSubtasks] actionName: 121 Resolved 2014-05-08 09:56:53,366 http-bio-8080-exec-11 DEBUG dre 596x240617x1 1jmaxot X.X.X.X,0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [canned.workflow.postfunctions.ResolveParentAfterSubtasks] subtask: IR-431 2014-05-08 09:56:53,366 http-bio-8080-exec-11 DEBUG dre 596x240617x1 1jmaxot X.X.X.X,0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [canned.workflow.postfunctions.ResolveParentAfterSubtasks] subtask.isSubTask(): true 2014-05-08 09:56:53,369 http-bio-8080-exec-11 DEBUG dre 596x240617x1 1jmaxot X.X.X.X,0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [canned.workflow.postfunctions.ResolveParentAfterSubtasks] Resolve parent 2014-05-08 09:56:53,370 http-bio-8080-exec-11 WARN dre 596x240617x1 1jmaxot X.X.X.X,0:0:0:0:0:0:0:1 /secure/WorkflowUIDispatcher.jspa [canned.workflow.postfunctions.ResolveParentAfterSubtasks] Action name: 121 Resolved not found for this step.
The parameters we supplied for thepost function are
Parent Action: Resolved (121) Resolution: Completed
The transition 'Resolved (121)' is used in numerous other workflows. This snippet from the post-function groovy is where things go awry:
if (allResolved) { log.debug ("Resolve parent") Integer actionId = actionName?.replaceAll(/ .*/, "") as Integer if (WorkflowUtils.hasAction(parent, actionId)) { WorkflowUtils.resolveIssue(parent, actionId, user, resolutionId, [:]) } else { log.warn("Action name: $actionName not found for this step.") } }
What are we doing wrong?
Thanks.
Are you 100% sure that the action id is 121, and when you mouse over it on the parent issue, the url shown in the status bar has action=121 ?
That code has been around a long time, I doubt if it's not working. The way it's done is not ideal but it's for backwards compatibility.
Where should I be doing the hover? In the workflow editor?
The only thing mentioned there are Step Ids and Transition Ids. In the workflow the Step Id for Resolved is 52 and the Transition ID for Resolved is 121. In the drop down when setting up the post function parent action only 'Resolved (121)' appears which is why that was selected.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK. I think I found the spot. In the parent issue, if I clcik on 'Workflow' and then hover over 'Resolved' the URL at the bottom of the page includes 'action=121'. Also, the annotation box that pops up says 'Resolved - Managed by JIRA Agile.' Not sure if that is significant or not.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
History is only showing myself and the other developer as having done any transitions.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you check the history? Maybe JIRA Agile is doing an action on the issue as well, so at the point the script runs, the action is not valid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just another point of information. It does not matter what transition/resolution we choose. The issue still does not transition to the chosen state.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.