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
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 vote
Joe 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!

Joe 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?

Joe 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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

1,023 views 3 12
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