Prevent issue resolution when tests aren't done

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
Accepted answer
Tarun Sapra Community Champion Jun 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 

Thank you very much!

Tarun Sapra Community Champion Jun 12, 2017

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

0 votes
Joseph Pitt Community Champion Jun 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. 

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!

Joseph Pitt Community Champion Jun 12, 2017

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

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?

Joseph Pitt Community Champion Jun 12, 2017

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

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,725 views 17 21
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