How to allow only to issues with subtask to transition from one state to another?

MajoG May 21, 2013

Hi!

I have this workflow:

Open > Design > Development > Testing > Testing UAT > Closed

You can only close an issue when the issue is in Testing UAT. But I allow to create subtask, and in order to close the issue parent I had to create two transitions from "Design" and "Development" to "Closed".

I need help with two things:

1) I want to disable the issue parent from closing until his subtask are closed.

2) I want to make available the transition Design > Closed and Development > Closed only for issues with subtask that are already closed.

Here it is an image of my workflow

Workflow

Cheers, Mage

2 answers

1 vote
Ramiro Pointis
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.
May 21, 2013

Hi Majo, maybe Script Runner has what you are looking for. You can use the Allow the transition if this query matches a JQL query or maybe the All sub-tasks must be resolved condition, altought maybe you will need to do some coding you can take a look at it, it's a free plugin.

Check here what you can do:

https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts

MajoG May 28, 2013

Hi Ramiro,

Thanks for the suggestion, I'll try it these days.

Cheers, Mage

1 vote
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.
May 21, 2013

There's a condition for "only allow a transition if all subtasks are in status I choose" which will do that. I think it's in the core, but it might be in the Jira Toolkit or Jira Suite utilities

That can be configured to answer both 1 and 2 (I'm not 100% sure I've quite understood q2 though)

MajoG May 21, 2013

Hi Nic,

I've changed the description of point (2) and I've attached the image of my workflow.

I want to use the red transitions are only for issues with subtask. Why?

Because the user creates subtask in Desing or Development, and then the user moves foward the subtask till Closed. And when the last subtask get to Closed, the system asks my if I want to closed the issue parent. For that I need the red transitions, because the issue parent won't be going throw the other states because the subtask did that.

I hope this helps to understand what I ment.

Thanks a lot for your answer.

Cheers, Mage

MajoG May 21, 2013

I've tried it and It works for issues with subtask.

But the problem I had it with issues without subtask. This issues can use the red transitions, and I don't want them to use it.

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.
May 21, 2013

Ah, I apologise, I didn't see that case at all.

Yes, I think you're a bit stuck. It's a doddle in some of the Jira systems I look after - we have a plugin that provides a number-of-subtasks field, so we can say "if #subtasks < 1, block it", but I don't know if you can do this with off-the-shelf Jira, or even with the main plugins I mentioned.

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.
May 21, 2013

That's exactly what that "block transition if subtasks are in X" condition can do

MajoG May 21, 2013

Ok Nic, thanks a lot! :D

Suggest an answer

Log in or Sign up to answer