Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why are my values missing in my custom issue field?

Joel Rauch
September 19, 2022

I'm trying to set up an automation, I want to use "Issue Field Conditions" and have it check to see if my "Employment Type" custom field is not set to a certain value. I've only got four values in there.

When I go into my automation and add the issue condition, none of my values are showing up.

Any ideas on why this is?Screen Shot 2022-09-19 at 11.11.53 AM.png

When I go to submit the request, the values are definitely there as well as in the options.
Screen Shot 2022-09-19 at 11.13.36 AM.png

1 answer

0 votes

Hi Michael,

 

You've got a NullPointerException :

com.atlassian.jira.workflow.SkippableValidator@4b24c667: root cause: java.lang.NullPointerException

The stacktrace tell you the line where the Null Pointer is, just after this text. Take a look there.

 

I can see two mistakes in your code :

  1. There is two points after getIssueManager() :

    ComponentAccessor.getIssueManager()..createIssueObject(user,copiedIssue)
  2. The createIssueObject returns you the created issue, you don't need to get it.
copiedIssue = ComponentAccessor.getIssueManager().createIssueObject(user, copiedIssue);

           This line is enough.

 

Hope this help.

 

Best regards,

Christophe Sauvage

huntermike
November 6, 2017

The Nullpointer exception is in this line:

copiedIssue=
ComponentAccessor.getIssueManager().
getIssueObject(ComponentAccessor.getIssueManager()..createIssueObject(user,copiedIssue).getKey());

 

I've tried your version but it throws the same exception.

copiedIssue=(MutableIssue) Issues.issueManager().createIssueObject(user,copiedIssue); 

 

java.lang.RuntimeException: Error copy issue CSD-1: com.atlassian.jira.workflow.WorkflowException: An unknown exception occured executing Validator com.atlassian.jira.workflow.SkippableValidator@65145c83: root cause: java.lang.NullPointerException
 at com.swql.jaeger.jira.webwork.CreateProjectAction.copyIssues(CreateProjectAction.java:233) [?:?]
 at com.swql.jaeger.jira.webwork.CreateProjectAction.doExecute(CreateProjectAction.java:88) [?:?]
 at webwork.action.ActionSupport.execute(ActionSupport.java:165) [webwork-1.4-atlassian-30.jar:?]
 at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) [jira-api-7.2.2.jar:?]
 at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) [webwork-1.4-atlassian-30.jar:?]
 at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) [webwork-1.4-atlassian-30.jar:?]

 

Could it be from the mutable issue?

Any other idea?

Visibly, you have a validator in your workflow.

 

Take a look here, it'll probably help :

https://confluence.atlassian.com/jirakb/project-import-completed-with-error-unable-to-create-issue-due-to-field-required-validator-on-target-workflow-792309260.html

 

Tell me if it helped you.

huntermike
November 6, 2017

The problem was something different, it was the user which leads to the null pointer exception. With hardcoded user "admin" it works again. 

Thank you Christophe for your help ! 

Glad you found a solution !

You're welcome !

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events