Uploaded image for project: 'Migration Platform'
  1. Migration Platform
  2. MIG-1041

JCMA doesn't support the migration of unexpected locked custom fields when restoring a backup from cloud to server

XMLWordPrintable

    • 13
    • Minor
    • 60

      Issue Summary

      When restoring a Jira backup from cloud to server/DC some custom fields may end up unexpectedly as "Locked". The definition of unexpected comes from the fact that the custom field types may not be expected to be "Locked". Examples of expected ones are some JSW (Epic Status, Epic Color, etc), AR (Teams, Original Story Points), and JSM (Organizations, Approvals) fields.

      We were able to reproduce this with the custom field types com.atlassian.jira.plugin.system.customfieldtypes:float and com.atlassian.jira.plugin.system.customfieldtypes:datepicker.

      The reason for this, and specifically for the observed examples is that they are Locked fields on the cloud and can be of Team-Managed projects scope, such "Story point estimate". Other example that can be associated with company-managed projects is "Start Date".

      Environment

      • Cloud to Cloud (C2C) migrations going through a temporary DC instance
      • Site import C2S
      • JCMA S2C

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      1. Have a Locked date picker or float custom field on the cloud
      2. Take a cloud backup for the server
      3. Restore the backup on a DC instance
      4. Create a plan with the JCMA
      5. Download the pre-migration reports

      Expected Results

      No reference to those fields will appear as unsupported.

      Actual Results

      We can see references of those custom fields as unsupported on the "Requires attention_Pre-migration report". Example:

      Impacted type Impacted name Problem Description
      Custom field "Start date" [customfield_10311] Custom field configuration The "Date Picker" custom field type is not supported via migration.
      Custom field "Story point estimate" [customfield_10312] Custom field configuration The "Date Picker" custom field type is not supported via migration.

      The below exception is thrown in the atlassian-jira.log file:

      ... Unsupported custom field "Story point estimate"(customfield_10312) of type com.atlassian.jira.plugin.system.customfieldtypes:float is referenced from ...
      

      Workaround

      Before the import

      Option 1 (Recommended)
      Edit the entities.xml file to remove the entry on the managedconfigurationitem table that is associated with the impacted custom field. Before doing that, you'd need to know the id of the custom field. In the example below, the custom field id is 10312.

      <ManagedConfigurationItem id="10305" itemId="customfield_10312" itemType="CUSTOM_FIELD" managed="true" accessLevel="LOCKED" source="com.pyxis.greenhopper.jira:reference-select-locked" descriptionKey="gh.customfield.locked.desc"/>
      

      Option 2
      Instead of removing the entry above, edit the accessLevel value to an empty one.

      <ManagedConfigurationItem id="10305" itemId="customfield_10312" itemType="CUSTOM_FIELD" managed="true" accessLevel="" source="com.pyxis.greenhopper.jira:reference-select-locked" descriptionKey="gh.customfield.locked.desc"/>
      

      Option 2 may leave Jira in an unstable mode, and cause some unexpected warnings with the JCMA.

      After the import

      Delete the row associated with the custom field on the managedconfigurationitem table.

              a4f78cbc8f0a Kanchan Jeswani
              fbeck Fábio W. [Atlassian] (Inactive)
              Votes:
              5 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: