Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Locked or Managed Jira fields


Hi Team,

We have field name called "Treatment:, it came up with addon "Risk Register". By mistake I unlock this field to check something using script mentioned in this scrip runner document.

When I ran the second script to unlock, the field "Treatment" is moved from "Managed" tag to "Locked". With "Managed" tag, I can configure the field, but not with "Locked". Is there any possibility to put it back from "Locked" to "Managed" ?

Please find the attached screenshots for your reference.

Before change :



After Change :



2 answers

Solution : It worked.

If we run the second script again but change ConfigurationItemAccessLevel.LOCKED to ConfigurationItemAccessLevel.ADMIN this should return the field to 'managed' and allow edits to be made.

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.managedconfiguration.ConfigurationItemAccessLevel
import com.atlassian.jira.config.managedconfiguration.ManagedConfigurationItemService
import com.atlassian.jira.issue.CustomFieldManager
ManagedConfigurationItemService managedConfigurationItemService = ComponentAccessor.getComponent(ManagedConfigurationItemService)
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()

def cf = customFieldManager.getCustomFieldObjectByName('Treatment')

if (cf) {
def mci = managedConfigurationItemService.getManagedCustomField(cf)
if (mci)

{ def managedConfigurationItemBuilder = mci.newBuilder(); def updatedMci = managedConfigurationItemBuilder .setManaged(true) .setConfigurationItemAccessLevel(ConfigurationItemAccessLevel.ADMIN) .build(); managedConfigurationItemService.updateManagedConfigurationItem(updatedMci); }
0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 18, 2023

I would suggest you query all the details of either another locked field from that addon or the same field in a different instance to view all the attributes of the mci.

Then remove the fields from the managed configuration and add it back with the missing property.

For example, the only managed items I have are related to agile. The code on that kbase for adding the item back is missing a step to set the source and i18n description



There should be something similar for your field.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events