Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Issue when trying to move to resolved status and the fix version is completed

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

1 answer

0 votes

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

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

I am using Scripted Validator.

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()

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"

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"

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Why everyone using Jira must be GDPR-compliant

Did you know that penalties up to 4 % of the yearly company turnover are possible in case of GDPR violations? GDPR regulations are currently mainly relevant for companies in the EU, but countries lik...

81 views 1 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you