How to unlock a Locked Jira Software Field

Still need help?

The Atlassian Community is here for you.

Ask the community

This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Functional differences in Atlassian Cloud, the contents of this article cannot be applied to Atlassian Cloud applications.

Symptoms

In some cases you will need to unlock a Locked JIRA Software field.

Cause

These fields are locked to prevent accidental changes which can subsequently break the operation of JIRA Software. Due to certain problems within JIRA Software, sometimes the fields need to be manually unlocked so they can be altered.

Resolution

(warning)  Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Run the following query via database to determine the JIRA Software custom field IDs

    SELECT id,customfieldtypekey,cfname from customfield where customfieldtypekey like 'com.pyxis.greenhopper.jira%';

    It should return a result like the following:

      id   |                         customfieldtypekey                         |         cfname
    -------+--------------------------------------------------------------------+-------------------------
     10204 | com.pyxis.greenhopper.jira:gh-global-rank                          | Rank
     10205 | com.pyxis.greenhopper.jira:gh-sprint                               | Sprint
     10206 | com.pyxis.greenhopper.jira:gh-epic-link                            | Epic Link
     10207 | com.pyxis.greenhopper.jira:gh-epic-label                           | Epic Name
     10208 | com.pyxis.greenhopper.jira:gh-epic-status                          | Epic Status
     10209 | com.pyxis.greenhopper.jira:gh-epic-color                           | Epic Colour
     10211 | com.pyxis.greenhopper.jira:greenhopper-releasedmultiversionhistory | Release Version History
  2. You will have to match the id of the field you want to unlock with the according entry in managedconfigurationitem table's item_id column.

    SELECT * from managedconfigurationitem;
      id   |      item_id      |  item_type   | managed | access_level |                       source                       |      description_key
    -------+-------------------+--------------+---------+--------------+----------------------------------------------------+----------------------------
     10000 | customfield_10204 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10001 | customfield_10205 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10002 | customfield_10206 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10003 | customfield_10207 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10004 | customfield_10208 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
     10005 | customfield_10209 | CUSTOM_FIELD | true    | LOCKED       | com.pyxis.greenhopper.jira:reference-select-locked | gh.customfield.locked.desc
  3. You will need to set the managed column to false of any field you want to unlock. For example, the below will unlock Epic Status and Epic Colour:

    UPDATE managedconfigurationitem set managed='false' where item_id in ('customfield_11208','customfield_11209');

    Note: After the above change the 'access_level' column will remain with the 'LOCKED' value, but the custom fields will be unlocked from the UI.

  4. Make the required changes to the fields.
  5. Lock the fields that were unlocked by setting the managed column to true. For example, the below will lock Epic Status and Epic Colour:

     UPDATE managedconfigurationitem set managed='true' where item_id in ('customfield_11208','customfield_11209');

These fields will be locked again on startup by automated tasks within plugins.

Last modified on Sep 5, 2018

Was this helpful?

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