can we see a list of field names which have been locked, please ?
for example, I see a few of field like this, while a list would be nice in jira or in jira database.
Sprint LOCKED
JIRA Software sprint field
Go to Admin -> Issues -> Custom fields and read the list, looking for the word "locked".
I'm curious as to why you ask (because it's useless information for anyone other than the current admin checking no-one has messed up the config by hacking the database), and why you didn't already know that was the answer.
I think I found this using the database customfield table once
Oh, or a ScriptRunner script looking at each custom field. Or REST API.
I think I scribbled something out for REST once as well.
I know this is an old topic, but it came up on Google when I was trying to figure out this exact thing. I managed to find an answer, so I figured I'd post in case anyone in the future is in my situation.
This SQL query should return a list of all Locked custom fields:
SELECT * FROM managedconfigurationitemWHERE item_type='CUSTOM_FIELD' AND access_level='LOCKED'
I used it because I needed a list of custom fields that weren't locked when evaluating fields that are no longer in use in our instance (one which I inherited that somehow accumulated over 1,000 custom fields).
This helped, thanks!
Hello,
I wrote ScriptRunner script for that purpose (for Jira Server):
import com.atlassian.jira.issue.fields.CustomFieldimport com.atlassian.jira.config.managedconfiguration.ConfigurationItemAccessLevelimport com.atlassian.jira.config.managedconfiguration.ManagedConfigurationItemServiceimport com.atlassian.jira.component.ComponentAccessordef cfm = ComponentAccessor.getCustomFieldManager()ManagedConfigurationItemService managedConfigurationItemService = ComponentAccessor.getComponent(ManagedConfigurationItemService)List<CustomField> cfs = cfm.getCustomFieldObjects()List<CustomField> lockedCfs = new ArrayList<>()cfs.each { CustomField cf -> if (cf) { def mci = managedConfigurationItemService.getManagedCustomField(cf) if (mci && mci.getConfigurationItemAccessLevel() == ConfigurationItemAccessLevel.LOCKED) { lockedCfs.add(cf) } }}lockedCfs.each { log.info it.name}
It looks like you're new here. Sign in or register to get started.