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

Hi,

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

0 vote

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

0 vote

The condition tester with asserts can help you get the code right... https://jamieechlin.atlassian.net/wiki/display/GRV/Built-In+Scripts#Built-InScripts-PowerAssertions

0 vote

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{it.issueTypeObject.name != "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?

0 vote

OK then instead of: issue.resolutionObject, use: issue.statusObject.name == "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
0 vote

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?

Hi,

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

754 views 2 19
Join discussion

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