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) """ ]