Hello,
I'm using Jira Cloud and am running into a bug when trying to perform some automation. Someone in our organization created a custom field called Sprint that is a short text field when they were configuring their issue details. Because of this, automation is failing when I attempt to update all items in the sprint, because it doesn't know whether to use the built-in default Sprint field or the custom short text field that was inadvertently created.
I used the API to find the duplicated field as shown in the screenshot below:
I'm sending the following command in a terminal:
curl -X DELETE -u <user>:<api_token> -H "Accept: application/json" "https://<domain>/rest/api/3/field/customfield_10229"
and I receive the following response:
{"errorMessages":["Field not found."],"errors":{}}%
I also receive this same error message when I try to view the field in a browser at the following endpoint:
rest/api/3/field/customfield_10229/context
Can someone please tell me how we can get rid of that field entirely from the database? It's causing a ton of issues and appears to be a bug on Atlassian's side. Thanks.
In case if anyone has the similar issue, the way I managed to fix it was to create a field directly in this list {jira_project_url}/secure/admin/ViewCustomFields.jspa
Before that I was creating the custom field directly in the issue type: /jira/software/projects/MBA/settings/issuetypes/10005
After running a request to get field configurations, it turned out that the field I created in the Issue type was not in the list. It appeared after I created in the list of Custom field explicitly.
Not sure that it is a right approach though. I assume that it might be relevant to dropdowns only, e.g. the fields that return Objects and need Context to be accessed first.
I couldn't figure out how to access context of such fields, may be they are not designed for this purpose. There are also 2 other sets of methods to retrieve fields but used only when the fields were created either from Connect or Forge.
Thanks so much for this comment, moved my custom fields and now the api hits successfully!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mike Lubke ,
Any luck with this one? Getting exactly the same issue with custom field when trying to reach context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a support ticket created and the Atlassian folks were able to track down the outlier. See the following information from them:
After reviewing the situation, I discovered that the custom field in question was created in a Team-managed Project.
Currently, these types of projects cannot be managed through the API, which is why you're encountering the "field does not exist" error when attempting to delete it.
We have an existing feature request to address this limitation:"Ability to Create and Manage Team-Managed Custom Fields with API"
In the meantime, the only way to delete the custom field is through the UI.
I've identified that the field was created in the Data Engineering project.
To delete it, you can access the Issue Types page and use the "Search all fields" function to locate the field by typing "Sprint."
From there, you will be able to delete it:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Mike Lubke -- Welcome to the Atlassian Community!
With the delete operation, it seems the contextId must also be provided:
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the quick response, Bill. When I try to get the context ID, I get the following:
/rest/api/3/field/customfield_10229/context
{"errorMessages":["The custom field was not found."],"errors":{}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm...if the field is still showing from the global admin functions and you are getting this error, you may want to ping the Atlassian Support team to take a look. You appear to be on a Standard license level and so your Jira Site Admin can help submit the ticket here: https://support.atlassian.com/contact/#/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.