You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Previously, I have an issue when trying to move to resolved status and the fixed versión was not set, it should show a message asking to complete fix versión.
Now, I am trying the other way around: having the fixed versión complete and trying to move to resolve status.
It is supposed that I shouldn't have any issues, but when I click on Resolve button it shows me the following message:
An unknown exception occured executing Validator com.atlassian.jira.workflow.SkippableValidator@17eedcdc: root cause: java.lang.NullPointerException
The code that I have in the Validator in the transition is:
import java.util.Collection;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.project.version.Version;
import com.opensymphony.workflow.InvalidInputException;
//Collect<Version> fixVersions = $issue.getFixVersions();
if (! $issue.fixVersions) {
throw new InvalidInputException("Fix Version/s is required");
}
What am I doing wrong? why is it showing that message? could you please help me?
Thanks in advance
Ro
It should be enough adding this in a simple validator:
issue.getFixVersions()
And then select the field fix versions to show the error you want there.
Hi Cristian!
I have written the exact what you told me, but now it doesn't show me the message error when the fix version is not complete.
I fogot to tell you that I am using Groovy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Are you using a simple validator or a scripted validator? Note that this are not the same. In Simple validator you don't need to use
throw new InvalidInputException("Fix Version/s is required");
But you ned to use it in a scripted validator
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.
If you are using scripted validator use this:
import com.opensymphony.workflow.InvalidInputException
if (issue.getFixVersions()
) {throw new InvalidInputException("Fix Version/s is required");
}
If you are using Simple Validator, this should be enough:
issue.getFixVersions()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not have Script Runner installed (the company doesn't want to invest money on this) so I have installed Code Runner Groovy, and I have written the code in my first post. But As I have said, when the fix version has a value then it shows the error "An unknown exception occured executing Validator com.atlassian.jira.workflow.SkippableValidator@17eedcdc: root cause: java.lang.NullPointerException"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not have Script Runner installed (the company doesn't want to invest money on this) so I have installed Code Runner Groovy, and I have written the code in my first post. But As I have said, when the fix version has a value then it shows the error "An unknown exception occured executing Validator com.atlassian.jira.workflow.SkippableValidator@17eedcdc: root cause: java.lang.NullPointerException"
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.