How can I use a Workflow Condition or Validation against the Sprint Field

Liam Maeder September 2, 2019

Good Day

I am trying to restrict tasks from being moved to Closed if they are in an open sprint. Is this possible to have as a validator or condition on that transition?

Please any help is appreciated.

Thanks and Warm Regards
Liam Maeder

*Edit: Amended spelling mistake*

2 answers

2 accepted

1 vote
Answer accepted
Radhika Vijji _Innovalog_
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.
September 3, 2019

Hi Liam,

If you have the JMWE app, you can use the Scripted (Groovy) Validator/Scripted Groovy condition of the app to check that the issue is in an open sprint. The app has an inbuilt editor help that will help you in writing the one line Groovy script to check the status of the Sprint the issue belongs to. Something like this:

!(issue.get("Sprint").any{it.isActive()})

Regards,

Radhika 

1 vote
Answer accepted
Fazila Ashraf
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 2, 2019

Hi @Liam Maeder 

The commercial plugins scriptrunner (https://scriptrunner.adaptavist.com/5.5.7/jira/builtin-scripts.html#_jql_query_condition) and JWT (https://apps.decadis.net/display/JWT/Condition+and+validation+based+on+JQL+query) has conditions to check based on a JQL query. You could use that along with the JQL clause "sprint not in openSprints()" to achieve this requirement.

Liam Maeder September 3, 2019

Hi @Fazila Ashraf 

We don't have script runner yet, but I am pushing to have it added to our system ASAP, which will hopefully be this year.

Thanks for the help, I will implement this as soon as we have it.

Many Thanks and Warm Regards

Suggest an answer

Log in or Sign up to answer