Change Context for an Existing Custom Field Without Losing Old Data

Still need help?

The Atlassian Community is here for you.

Ask the community

Description

In some cases, it may be necessary to change the context for an existing custom field that has been previously populated with data. Doing so may cause a loss of data, requiring that all previous issues are updated after changing the context. This will ensure integrity of historical data by forcing the custom field to update with fresh back-end data, even though nothing will appear to have changed in the JIRA interface.

There is a related bug currently tracked in  JRASERVER-62455 - Getting issue details... STATUS

Example

Scenario

A 'Select List' custom field exists called "Example List" populated with the following values:

  • Value One
  • Value Two
  • Value Three
  • Value Four

It has an existing context with no default value.

The "Example List" field is used in the projects "Example Project - No Default" and "Example Project - Default." This field has been in use on both projects for some time, so both projects have issues with this field populated.

Goal

Change the context for the "Example List" without losing the data previously entered into the custom field for "Example Project - Default."

When we're done, we should have:

ProjectCustom FieldDefault Value
Example Project - No DefaultExample List (old context)(none)
Example Project - DefaultExample List (new context)'Value Three'

In other words, the "Example List" custom field will stay the same, including the existing values from those issues that have already been created, but new issues in the "Example Project - Default" project will have a default value for "Example List."

"Example Project - No Default" will not undergo a change of context for the "Example List" custom field, so no further action will be necessary.

Process

Caution

If you have a test environment, please utilize it for your own testing before making any changes on your live instance of JIRA. Either way, we highly recommend backing up your data before proceeding.

  1. Assign your new context (with a default value) to "Example Project - Default"
  2. Navigate to Issues >> Search issues
  3. For each possible value entered into the "Example List" custom field
    1. JQL Search: Project = "Example Project - Default" AND "Example List" = someValue
    2. Tools >> Bulk Change
    3. Select all issues, click Next
    4. Select Edit Issues, click Next
    5. Tick the box for "Example List" and choose someValue, click Next
    6. Review changes, then Confirm
Expand for example of process...

(info) The process for the value "Value One" would look like this:

  1. Issues >> Search Issues
  2. JQL Search: Project = "Example Project - Default" AND "Example List" = "Value One"
  3. Tools >> Bulk Change
  4. Select all issues, click Next
  5. Select Edit Issues, click Next
  6. Tick the box for "Example List" and choose "Value One", click Next
  7. Ensure we're updating all issues from "Value One" to "Value One", then click Confirm



Last modified on Jan 24, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.