Transition a story with some subtasks in closed status and then others in open status


One of the workflow we use has a condition that all subtasks of a story should be closed before a story is moved into next status.However the request is that some subtasks created for other purpose for the same story could remain open but still the story should be able to be moved to the next step.

I tried with scripts as well but i am stuck.Is there any waz out for this problem?

19 answers

Post the script that you tried, and be specific about what subtasks should be allowed to be open. This should be easy.

type=sub-task AND issuetype!=Testsub AND status= closed(Sub-Task)

Here testsub is the reference subtask i created for some testing tasks for a story.

I wanted to imply with this that though the other sub tasks of the story could be closed but the ones with type Testsub may remain open.i.e., the story could transition only if subtasks other than the Testsub ones are closed.

Does this make sense?

Itried some more scripts and way out after this but it didnt seem to help.

tried this as well

"issuetype = Story and issuetype = Sub-task And status = "Closed (sub-task)" and issuetype= Testsub and status = "In Progress (sub-task)""

To be honest, none of those make any sense. If you want that all subtasks should be resolved except those of type "Testsub" - and that needs to be the issue type, not the summary or something, you could use:

issue.subTaskObjects.findAll{ != "Testsub"}.every{issue.resolutionObject}

Hi Jamie,

I am new to this kind of script so i am at a loss.I uesd it and it says MismatchedSetException(46!=null).

Could you please tell me if i could custoimize this thing like the ones i have made myself?

can you post a screenshot?

OK then instead of: issue.resolutionObject, use: == "Closed"

This is the error

But i have used every possible combination like the ones shown above.I guess i am not going wrong anywhere as these are not giving the desired result.

I would like to add that there is no resolution set for any tasks

its only the status and hence the status should be Closed(sub-task)

The error is still the same

You may have used every possible combination, but you've used it in the wrong place. If you like, send a screenshot when using the "simple scripted condition". Alternatively you could write your own plugin if that's easier.

Thanks Jamie.I am now trying out the simple script.I havent received any positive result but i will keep trying

I am unable to use JQl to take the issue types for a particular parent i.e., only the subtasks blonging to a particular parent need to be checked before the transition.Is it possible?


If i use a transition with a condition that the parent story can only be moved if all its subtasks are closed,is it possible to make this condition selective that a certain number of subtasks could remain open.This is to implement a requirement that certain subatasks need to remain open while the others are closed.

Does anybody have an idea of a workaround?

If the workflow transition has a status that the parent story can only move provided that all its subtasks are closed,then is it possible to modify this so that only certain tasks need to be closed while the others could remain open?

Is there any way to do that because i tried a lot but am still hiting a roadblock?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

861 views 3 9
Read article

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