Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-33720

Indexing failure for issues that multiple options specified in a multiselect list, if the sequence value is null for any option

    XMLWordPrintable

Details

    Description

      For whatever reason, it's possible that the sequence value for an Option object can be null (the API should not have allowed it if was a problem).

      In jira 5.x this didn't seem to cause any problem, but in jira 6.x this causes an indexing failure:

      MultiSelectCFType.compare failed for option1: FIRST option2: SECOND
      java.lang.NullPointerException
              at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare(MultiSelectCFType.java:100)
              at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare(MultiSelectCFType.java:94)
              at java.util.Arrays.mergeSort(Arrays.java:1270)
              ....
              millions more
      

      This is a serious issue because just one issue with this problem will break a full reindex, leaving the index half complete.

      GRV-282 has a workaround.

      To reproduce

      • Create a multiselect custom field with a few options.
      • Create an issue and set 2 options for this custom field.
      • Set the sequence to null using the database.
      • Restart jira or clear internal caches.
      • Reindex all.

      As a possible workaround solution:
      Open the customfield configuration, edit the options, just change one option's order to higher or lower then change back. Then click on the button "Done" to save the change. The sequence will be added.

      Attachments

        Issue Links

          Activity

            People

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              714061b26763 JamieA
              Votes:
              6 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: