JIRA Groovy validator to fire if fixRelease is unreleased

Hi all,

I need to fire a validator if the Fix Version/s is unreleased, and therefore does not have a releaseDate.  I prefer to check if it is released or not but all released versions have release dates and vise-versa.

We enforce that there is only one fix version for each issue, if the issue gets resolved in another version then another issue is used.

I have tried the following, none of which work:

  • issue.fixVersions*.isReleased()
  • issue.fixVersions*.releaseDate
  •  srcVersion.releaseDate
  • srcVersion.isReleased()
  • issue.srcVersion.isReleased()
  • issue.fixVersions*.getReleaseDate()

Any thoughts on how to setup a simple validator ito fire if the fix Versions is unreleased?



2 answers

1 accepted

Thank you @Vijay Khacharia!  this post Validator to make sure fix version >= affects version on resolving issue solved my problem!

Here is the condition to fire the validator for unreleased versions.


Thank you @Vijay Khacharia! You helped me too.
And I found more expretions to solve some related problems:

  • issue.getFixVersions().get(0).getReleaseDate()
  • (issue.getFixVersions() == null)
  • issue.getFixVersions().iterator().next().isReleased()

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published yesterday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

39 views 0 3
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