It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Help with Parent Transitions upon Sub Tasks Transitioning.

So I seem to be struggling with making the parent transition when I work a Sub Task.

I have a few questions though if anyone is willing to offer some assistance?

1. Is it possible to have a workflow set, so that when the final Sub-Task is set as Resolved (but not Closed) a Parent can move to Resolved too (but again, not Closed)?

2. After that, I'd then need it to be set so that when all of the Sub Tasks are then set to Closed, the Parent is Closed too.

3. Can you explain to me like I'm 5? As I'm new and it's my first real experience with this.

3 answers

1 accepted

13 votes
Answer accepted

1. Go to the workflow of ‘Parent Issue’ and locate the “resolve’ step. Click on ‘add a Condition’ to this step and add a sub-task blocking condition. You can select the state of sub-task ‘resolved’ in the next window you get. This will make sure that the parent issue will not be transitioned until the last sub-task is Resolved.

2. For transitioning the parent issue based of sub-task transition, you need a plugin called ‘JIRA Misc Workflow Extensions’ ( Which is commercial). Install this plugin on your JIRA .

3. In the sub-task workflow, go to the ‘Resolve’ step and edit it with a post function called ‘Transition parent issue’. Here you have to give the step/transition id of ‘Resolve’ step from Parent issue workflow.

4. You can follow step 1 and 3 for Close transition as well.
Please remember, auto transitions of parent issue works only if you don’t have any ‘Validations’ like ‘Fields Required’ . Sometimes it fails if you have added any user/group condition. So please make sure in the parent workflow there are no other validations/conditions added to the resolve/close step ( you already have added sub-task blocking condition, that’s fine).

Good to know that it was helpful.

That was really helpful, thank you for the detailed explanation!

Can you check is there any 'Conditions/Validations' added to the parent issue transition ?

Hi Vishnu, I'm having a bit of a problem with the Auto-Transition for the Parent. I was hoping you could expand on what potential problems I might have caused myself?

The Sub-Task blocker functions perectly, but when the last sub task is set to Resolved, the Parent issue doesn't move to the resolved step either. the same when i close an issue.

I have conditions in place where only a certain User Role may proceed with that transition. However these users are identical to the Sub-Task. Could that be causing an issue?

I have no validations set.

Can you make a try without any conditions ? Also, you may cross check the 'Transition ID' ( of parent) you gave in the sub-task post funtion.

I'm about to do that now, but on a side note, would it make a difference if I switched it to OR instead of AND?

OK, I removed all extra Conditions from both the Parent and Sub Task and still nothing. I confirmed the ID for the transition too.

Can you attach a screen shot of both parent and sub-task's conditions here ?

Here you go. Note that the transition numbers are set correctly.

The parent Transition ID is 21 and the Sub Task transition is 11.

So...

I found the problem. I corrected the steps as you originally had them.

However, here's where it gets weird (and I'm amazed this didn't cause some kind of Runtime issue).

I somehow managed to have two transitions set with ID 11. This meant it was going back to the other step which was earlier in the chain. That's pretty crazy, but now I've spotted it and corrected that, the step is fixed.

Thank you so much for your help, it's been fantastic!

I might be making new issue soon that I'll need some help with, so keep an eye out! haha.

Again thanks!

Alright sir :)

Cool !!!. Though I couldn't see the screen shot attached ;)

Yeah I deleted them because they dwarfed the thread.

Does this mean that Sub-tasks and Tasks need different workflows? Right now I have Task and Sub-task associated with the same workflow.

Note that you need to put the "Transition Parent Issue" function at the bottom of the list of post-functions. Otherwise, the Sub-task blocking condition on the parent will not find the current sub-task to be resolved, hence preventing the parent transition from going through.

Hi I use Script Runner to transition parent issue, But there is no place to set Parent Action. Does anybody know what the reason is?

Here the symptom is no response when I click "Transition parent when all subtasks are resolved",and it worked well before. meanwhie, some of the other post functions work.

Thank you Vishnu ! 

Like 1 person likes this
4 votes

1. You can add a condition to the workflow that "all subtasks must be in status x, y, or z" before it will allow the users to move on. In fact, it'll work for any status at any part of the workflow. If an issue has no subtasks of course, it will automatically allow it. You should find it in the off-the-shelf conditions in Jira.

2. That's a job for a listener which you'll need to find or write. I'm pretty sure I've seen a couple in the marketplace - they spot sub-tasks closing and scan the parent to check it's subtasks.

3. I'm not allowed to talk to children - apparently I bore them to death, or I'm too honest when they ask difficult questions that really should be left to their parents...

Let's say I have 2 workflows ("subtask" workflow and "all other issue type" workflow), and I modify the subtask workflow transition from QA -> DONE and I add a condition to it about the "blocking subtask status". Which status should I put here? What about when I want to reopen a parent issue based on the subtask transitioning from DONE -> "any previous column"

That behavior can be easily implemented using JIRA Workflow Toolbox plugin: Automatically Close Parent when Subtasks are Closed 

The solution described in the linked post can trivially be adapted for implementing the use case: resolve parent issue when subtasks are resolved.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted 40m ago in Industry Groups

Upcoming Team Tour Government Symposium in Washington D.C.

Calling all Community members from the Washington D.C. area! Atlassian’s Team Tour is heading to your city to host a Government Symposium on May 1st. Join our team and other government agencies to le...

9 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you