It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to restore to old option value of custom field?

Let me assume there is a custom field (select list (single choice)). There are two contexts in the custom field.

One project uses one context in this custom field and another project uses in another context in this custom field. One project has some existing tickets with this custom field and change the context to another context

in the custom field. This means option value in current existing tickets will be changed to another value. Right?

I would like to revert to original option value in current existing tickets. How can I do this? Please let me know.

2 answers

0 votes

If a value is not valid for a field, you can't have it in that field, it needs to be changed to a valid one.

The best you can do is create a copy of the value that is becoming invalid, make the change, and then make the new invalid value "archived" in the options so that it can't be chosen again.

If you've already made the change and flipped over the invalid options to something, then you'll need to add the duplicate option, get a list of the ones that have been updated, and bulk-edit them to take up the new (but archived) option.

Already deleted one context which current existing tickets with old option value. In DB those tickets

have old option value and if uses same custom field / option name to search tickets, but current option value is different from old option value, so we can't search tickets as our expectations I guess. Right? 


Doesn't ScriptRunner have a builtin script to help with this case?

Not specifically, but the bulk import and update en-masse might be able to do it.  A self-written console script could do it too of course.

Here is action to restore options:

  1. Restore JIRA from xml backup on test instance
  2. select all issues where this field is not empty: "field name" is not emty
  3. Do bulk update for each option on product instance
    1. Select issues with JQL: issues in (list on issue keis from test instance)
    2. do bulk update


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira Core

How to manage many similar workflows?

I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...

1,935 views 8 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you