Questions for Confluence license has expired.

Please purchase a new license to continue using Questions for Confluence.

Cannot set property 'value' on null object

 
2
1
0

I have setup hybrid sync between 2 projects within a jira instance and get following error.

NullPointerException: Cannot set property 'value' on null object

Showing error in the script but does not point to which line

Below is the script,

OEM.issue.customFields."OEM Affected Programs".value = "Alexandra"
//OEM.issue.customFields."OEM Customer Severity".value = "S2-Severe"

DAR.issue.customFields."Platform Common".value = "No"
DAR.issue.customFields."Translation Impacts".value = "No"
DAR.issue.customFields."Affects PLQA Tests".value = "No"
DAR.issue.customFields."Affected PLQA Tests are tested earlier".value = "No"
DAR.issue.customFields."Triage Pattern".value = "No"
DAR.issue.customFields."Is a Regression".value = "Unknown"
DAR.issue.customFields."Recovery".value = "Other"
DAR.issue.customFields."Feature".value = "Other"

I have added script at the end of the field mapping.

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      One of the customfields don't exist.
      To avoid the nullpointer, you can use the groovy safe navigation operator 
      DAR.issue.customFields."Bogus"?.value will not result in a nullpointer (check the ?)

      To locate the custom field - make sure that all fields exist

        CommentAdd your comment...