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

sap
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.
April 14, 2013

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 votes
sap
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.
April 15, 2013

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?

0 votes
sap
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.
April 15, 2013

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?

0 votes
sap
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.
April 14, 2013

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?

0 votes
sap
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.
April 14, 2013

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

0 votes
JamieA
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.
April 14, 2013

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.

0 votes
sap
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.
April 14, 2013
The error is still the same
0 votes
sap
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.
April 14, 2013

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)

0 votes
sap
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.
April 14, 2013

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.

0 votes
sap
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.
April 14, 2013
This is the error

0 votes
JamieA
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.
April 14, 2013

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

0 votes
Jamie Echlin April 14, 2013
0 votes
Jamie Echlin April 14, 2013

can you post a screenshot?

0 votes
sap
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.
April 14, 2013

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?

0 votes
JamieA
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.
April 14, 2013

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}

0 votes
JamieA
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.
April 14, 2013

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 votes
sap
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.
April 14, 2013

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 votes
sap
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.
April 14, 2013

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

0 votes
sap
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.
April 14, 2013

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?

0 votes
JamieA
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.
April 14, 2013

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

Suggest an answer

Log in or Sign up to answer