Prevent issue resolution when tests aren't done

Avishay_Zilka June 10, 2017

Hi,

In my project we create a separate "Test" (Zephyr) issue for every "regular" issue (Task, Bug, etc..).

In our customized workflow there is only one transition that moves the status to "Done", and I want to add to it a condition, that allows moving to done *only* if the related test issue (if exists) has status "Done".

I found that I need to write a "Script Condition" in groovy, but it would be very helpful to me if you could give some advice as to how I get this thing to work.

Thanks!

2 answers

1 accepted

1 vote
Answer accepted
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2017

You need to put the script in the validation section of the transition.

Here's an exactly same question as yours - 

https://community.atlassian.com/t5/JIRA-questions/Validator-script-to-check-status-of-all-linked-issues-before/qaq-p/427966 

Avishay_Zilka June 12, 2017

Thank you very much!

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2017

If it works for you, then please upvote/accept the answer. Thanks.

0 votes
Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2017

If you always do it make the Test a sub-task type and then you can prevent moving forward until all sub-tasks are resolved. It's built in. 

Avishay_Zilka June 12, 2017

That's a good idea Joe, but is there a way to define a sub-task of type other than "Sub-Task"? If there is, I didn't find it. It would be great!

Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2017

When you create a new issue type you can call it anything. You then select a normal or subtask type. 

Avishay_Zilka June 12, 2017

I'm afraid I didn't get it.

I use the  pre-defined"Test" issue type of Zephyr in Jira.

For a given task/bug/etc, I can choose "More" --> "Create Sub-Task", but this feature creates an issue of type "Sub-Task", which I (to my current knowledge) cannot chage.

What am I missing?

Joe Pitt
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 12, 2017

You need to create a NEW issue type with a new name and type of subtask. 

Avishay_Zilka June 12, 2017

Oh, I see. This would indeed control the dependency between the two issues, but would not allow me to use the Zephyr "Test" type that includes many more advantages for test management.

Thanks any way!

Suggest an answer

Log in or Sign up to answer