Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,410,233
Community Members
 
Community Events
169
Community Groups

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 Vishnukumar Vasudevan 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"

0 votes

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.

TAGS

Atlassian Community Events