Hi there,
following situation:
What I now want is, that when all sub-tasks are closed, the next transition step on the parent task is executed.
How can this be done?
Thanks for Helping.
Jörg
Community moderators have prevented the ability to post new answers.
If you have workflow extensions installed you don't need to write any code at all - just use the transition parent post function on the close step of the sub-task workflow using the id of the transition from the parent workflow you want (transition id, not step name/id). Set the conditions as needed on the parent workflow transitions to prevent it from transitioning when you don't want, and you should be good to go.
Oh, and make sure that you move the post functions for transitioning parent in the sub-task workflow to the BOTTOM of the post function events list; if you leave them at the top where it places them after you have added them it won't work.
Oh, and make sure that you move the post functions for transitioning parent in the sub-task workflow to the BOTTOM of the post function events list; if you leave them at the top where it places them after you have added them it won't work.
That was the important information.
Moving the post function to bottom and everyting works as I want.
Many thanks
Nat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome, I'm so glad that worked! I've run into the same problem several times myself so that is now one of the first things I check. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nat,
thank you very much for your tipps. I had so much problems to get this working. Now it works very well. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It doesn' seem to work, I have asked a question here - https://answers.atlassian.com/questions/157110/transition-parent-to-close-when-sub-tasks-are-closed-is-not-working-the-way-it-should
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Natalie Hobson , I had the same requirement and your solution worked for me !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Move to BOTTOM ... that solved it! *doh* Thank you very much!
@Atlassian isn't that a bug?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's now a very easy to configure way to transition parents and sub-tasks in sync using Automation for JIRA!
You can easily modify related issues (such as parents, stories, sub-tasks, epics, linked issues and even JQL) using our related issues action and condition:
(this example transitions sub-tasks, but you could just as easily change this to transition the parent as a result of a sub-task being transitioned)
You could configure a rule that simply checks if all sub-tasks are closed and then transition the parent to a given step using the related issues action.
For more details see https://blog.codebarrel.io/synchronize-parent-and-sub-task-issues-with-automation-for-jira-bdcca6c9d453
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
for
(sk in subtasks(parent.key)) {
if
(%sk%.status !=
"Closed"
&& sk != key) {
}
}
autotransition(
"Close"
,
parent.key
);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to do this in the post function. You can have a simple script that checks if all subtasks are closed and then pushes the parent task in the relevent transition. You might event be able to make it simpler by just throwing an event when the condition is satisfied and use Auto Tranisiotn Listener in JIRA Toolkit to do the transition.
If you are okay to do manual transitions but make it visible only when all subtasks are closed, it is even simpler. Just use the subtask blocking condition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jobin,
I have now found the condition "subtask blocking" and the plugin "JIRA Misc Workflow Extensions" provides the post function "Transition Parent Issue".
The single parts working now, but not when all meets togeter.
So: Transition is fired by sub-task when "subtask blocking" condition is disabled
But when the condition is enabled, closeing all subtask doens't fire the transition.
I'm going to make a bug report for the plugin because of this.
I will also check out "auto transition listener", thanks
Jörg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have now configured the auto transition listener but thats not working.
It's trying to execut the action on the sub-task workflow and not on the parent workflow.
Ans yes, I have entered the correct action id.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you didn't get my answer fully. You need something written by yourself to either push the parent issue or throw an event on the parent issue (along with Auto Transition listener on parent issue's workflow) when the subtasks are all resolved.
Subtasks blocking condition can only show/hide the transition on parent issue based on its subtasks status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The listener gets the event, I let be fired by the sub-task close transition.
But the auto listener tries to execute the action on the sub-task workflow (where this action Id is not available) and not on the parent task workflow (where the action Id is available).
And yes, the action ID was mentioned correctly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is, event is fired on subtask and the listener will hence attempt the transition on subtask. You need to fire the event on parent task to get auto transition listener working. You need a plugin or some scripting to do this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.