Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-1995

Copy multi-select custom field fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.1.3.16
    • Fix Version/s: 4.1.3.17, 4.3.7
    • Component/s: None
    • Labels:
    • Sprint:
      Sprint 26 - Ends Aug 16, Sprint 26 - Ends Sept 1, Sprint 26 - Ends Oct 3
    • Critical Points:
      0

      Description

      To reproduce:

      • Setup up two multi-select custom fields
      • Add field to issues
      • Copy first field to second field using copy custom field script

      Results in:

      java.lang.NullPointerException
      	at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getChangelogString(MultiSelectCFType.java:313)
      	at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getChangelogString(MultiSelectCFType.java:83)
      	at com.atlassian.jira.issue.fields.CustomFieldImpl.getChangelogString(CustomFieldImpl.java:481)
      	at com.atlassian.jira.issue.fields.CustomFieldImpl.updateValue(CustomFieldImpl.java:509)
      	at com.atlassian.jira.issue.fields.CustomFieldImpl.updateValue(CustomFieldImpl.java:487)
      	at com.atlassian.jira.issue.fields.OrderableField$updateValue.call(Unknown Source)
      	at com.onresolve.scriptrunner.canned.jira.admin.CopyCustomField.doScript(CopyCustomField.groovy:203)
      

      It looks like when we update the value the change log value is "["null"] so the null checks in:
      com.atlassian.jira.issue.fields.CustomFieldImpl#updateValue(com.atlassian.jira.issue.fields.layout.field.FieldLayoutItem, com.atlassian.jira.issue.Issue, java.lang.Object)

      fails resulting in the null pointer.

        Attachments

          Activity

            People

            Assignee:
            tbatagiannis Thanos Batagiannis
            Reporter:
            amarkham Adam Markham
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: