The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • Getting log error java.lang.NullPointerException: Cannot invoke method getValue() on null object

Getting log error java.lang.NullPointerException: Cannot invoke method getValue() on null object

Teja
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 19, 2020

Hi Team,

We are using Custom Listeners for populating field value based on another custom field and we are using change (event?.getChangeLog()?.getRelated("ChildChangeItem")) event for the particular custom field in the script.

Population is works fine but when we set the field value to empty other field stops populating fields.

For example:
We have
Dev SWAG (select list cf) and
QA SWAG ((select list cf) and
Dev SWAG value (Number field) and
QA SWAG value (Number field)

When Dev SWAG and QA SWAG are not empty, these populates values to Dev SWAG value and QA SWAG value respectively.

When either of Dev SWAG or QA SWAG are empty, populations stops work.

In the console we are getting error something like

[""" 2020-03-19 09:14:18,287 ERROR [runner.AbstractScriptListener]: Script function failed on event: com.atlassian.jira.event.issue.IssueEvent, file: null
java.lang.NullPointerException: Cannot invoke method getValue() on null object
at Script2.run(Script2.groovy:29) """ ]

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question