Quick one about issue fields (apps)

Can a Connect app programmatically change the name of an issue field that it specified in the descriptor?

Is PUT /rest/api/3/field/{fieldId} the way to do that? The documentation doesn’t say.

Hello @david.pinn

Yes, sending a PUT request to the Update custom field endpoint is how you change the name, description or searcherKey of a custom field.

You cannot change built-in fields, only custom fields.

I went ahead and coded this up. Unfortunately, it appears that an app cannot rename its own fields if those fields were created via a jiraIssueFields module.

HTTP 400: The custom field is locked.

At the very least, there’s a documentation inadequacy here.

Is there any mechanism for programmatically renaming fields created via jiraIssueFields modules?

Are you positive it is a custom field that you created via your Connect app, and not some other app / plugin / part of Jira itself?

It seems that custom issue field created by your Connect app has been set with a locked state to prevent other apps / REST API sessions from changing it.

You may have to delete your custom issue field, then create a new one with the desired name / description, then modify your Connect app to allow for the change.

The REST API documentation says that:

Connect app scope required* : ADMIN

… so it could be you’re not executing the PUT with sufficiently high enough privs?

If you search this forum or Google “jira cloud issue field locked” you will see lots of threads on the nature of locked custom fields that might get you closer to the answer.

Yes.

It appears that all fields created by jiraIssueFields modules are locked.

What I want is for my custom field to have a different name on each tenant’s Jira instance. Thus the need to rename it.

No. My app has ADMIN and ACT_AS_USER scope. I’m executing the PUT operation under the identity of my app.

OK, I get the full context now. I think you’re going to need to liaise with Atlassian how to go about changing that field’s name / description in Jira Cloud, for each single client instance. I remember reading articles on how to do it for Jira SERVER that required altering it at the database level, which isn’t allowed in Jira Cloud.