Unlock a locked Jira Software custom field

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

This KB article provides changes that are out of the scope of Atlassian Support and, therefore, is provided as-is. The steps are only meant to fix problems within Jira, and not necessarily to be used for any locked fields. Consult with Atlassian support before following the steps listed here. Altering locked system fields can introduce unintended side effects in Jira (such as the inability to pre-populate fields during Issue creation) if unexpected changes are made to default fields, such as adding Translation Text to fields that do not permit this by default.


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

If you have ScriptRunner installed, it is possible to unlock fields without a restart using the Groovy Scripts described in: Unlock a locked Jira custom field using ScriptRunner


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_10208','customfield_10209');

    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.

    Make sure to commit the changes if using an Oracle database.

  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_10208','customfield_10209');

    Make sure to commit the changes if using an Oracle database.

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

DescriptionIn some cases, you will need to unlock a Locked JIRA Software field. 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.
ProductJira
PlatformServer
Last modified on Sep 29, 2022

Was this helpful?

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