Hi, is there a way to make issues from already released fixVersions unable to be reopened?
Community moderators have prevented the ability to post new answers.
Hi @Tomasz,
It is possible to perform such a task; with the usage of the Groovy Script Runner plugin. I created the following script:
import com.atlassian.jira.issue.Issue import com.opensymphony.workflow.InvalidInputException // loop all versions for (int i = 0; i < issue.getFixVersions().size(); i++) { if ((issue.getFixVersions().get(i).released)) { //Only execute if the fix version is released invalidInputException = new InvalidInputException("assignee", "Issue could not be reopened. Version \"" + issue.getFixVersions().get(i).name + "\" has already been released.") break; } }
I saved this script as checkVersionIsReleased.groovy and placed it inside the $JIRA_INSTALL/bin/groovy-scripts directory (can be any directory, but it would have to be in the $JIRA_INSTALL/bin directory).
Once this has been done, I edited the Reopen Issue transition in my workflow to include this script as a validator:
And, when I tried to reopen an issue with a fix version that has already been released, the script will block me from reopening it:
The script above may be a bit rough off the edges, but I just came out with it in just a short time. It works for me, but may be some adjustments to the code? :)
Hope this helps!
Thought there would already be a JIRA function for this.
Thanks for the script. I'll try it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked perfectly!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.