Don't allow 'Close' when fixVerions contains the word "next"

e May 7, 2014

Hello. How do I prevent an issue from being Closed if there is 'next' word in FixVerion/s field?

Thanks.

3 answers

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
May 7, 2014

Conditioned validator using Substitution variables . In this case: %original_fixed_versions% NOT finding next.

e May 7, 2014

Sorry, is this a separate thing from 'Script runner plugin'?

I'm afraid I cannot install anything, but the Script Runner.

So, I need a solution on groovy.

0 votes
e May 7, 2014
This is the way I get the FixVersion.
How do I check if there is 'next' in it? Thanks!
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.Issue
import org.apache.log4j.Category
import com.atlassian.jira.config.SubTaskManager
import com.opensymphony.workflow.InvalidInputException

def fv = issue.getFixVersions()

0 votes
Peter Van de Voorde
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 7, 2014

Hi e t ,

You would probably need a validation on the Close transition so the transition will only work when these versions are not selected.

You could take a look at the script runner plugin, here are some examples of validations :

https://jamieechlin.atlassian.net/wiki/display/GRV/Validators

Best regards,

Peter

Suggest an answer

Log in or Sign up to answer