A validator that requires one released Fix Version

My Kro July 2, 2013

I'm using Fix Version as recommended by Atlassian, to track both the target release and the actual build:

V1.5 Target (unreleased)

Build 105 (released)

I need to ensure that when an issue is resolved, at least one released version (actual build) has been set. The Field Required validator doesn't help here as it accepts any version.

Is there a simple way to accomplish this? Thanks!

3 answers

1 vote
RambanamP
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.
July 2, 2013

why can't you write your won validator for your requirements

My Kro July 2, 2013

Thank you for your contribution. I could spend a couple of days to learn how to do this, but to be honest this seems like a very common scenario and I would rather re-use an existing solution.

RambanamP
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.
July 2, 2013

agree with you, but i dont think you will find the validate to check only released version has selecte. for your case Either write a custom plugin or use the script runner plugin and write some simple groovy script to handle this.

check here the how to write groovy script for validator

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

JamieA
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.
July 2, 2013
0 votes
JamieA
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.
October 22, 2014

if you install Script Runner, you can put a "simple scripted validator" on the Resolve transition, the condition would be this:

issue.fixVersions.findAll {it.released}.size() == 1

(untested)

is that all that needs to be added?

If you're using a Simple Scripted Validator, pretty much. It should look like this:

image2014-11-4 20:16:0.png

Jake Bishop November 4, 2014

is that all that needs to be added?

Robert G. Nadon
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.
November 18, 2016

Doesn't work for me.  Fails every time no matter how many fix versions are there: 1, 0, 2...

Like Ying Ma likes this
0 votes
Jake Bishop October 21, 2014

did you find a solution to your problem?

Suggest an answer

Log in or Sign up to answer