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

Help with Parent Transitions upon Sub Tasks Transitioning.

Chris Rose January 24, 2013

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
Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2013

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).

Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2013

Good to know that it was helpful.

Chris Rose January 27, 2013

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

Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2013

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

Chris Rose January 27, 2013

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.

Chris Rose January 27, 2013

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.

Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2013

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.

Chris Rose January 27, 2013

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?

Chris Rose January 27, 2013

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

Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 27, 2013

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

Chris Rose January 28, 2013

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

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

Chris Rose January 28, 2013

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!

Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 28, 2013

Alright sir :)

Vishnukumar Vasudevan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 28, 2013

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

Chris Rose January 28, 2013

Yeah I deleted them because they dwarfed the thread.

Lora Friedenthal May 16, 2013

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

David Fischer
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 8, 2013

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.

hote September 18, 2014

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?

hote September 18, 2014

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.

amit raj February 29, 2016

Thank you Vishnu ! 

Like Vishnukumar Vasudevan likes this
4 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 24, 2013

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...

Denis Mullaraj November 1, 2018

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
Fidel Castro
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 30, 2014

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
AUG Leaders

Atlassian Community Events