Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Field Not Found Error when attempting to delete via API

Mike Lubke November 8, 2024

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:

Screenshot 2024-11-08 at 1.36.21 PM.png

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.

3 answers

1 vote
Andrey Lednev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 2, 2025

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.   

 

Seth
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 20, 2025

Thanks so much for this comment, moved my custom fields and now the api hits successfully!

0 votes
Andrey Lednev
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 2, 2025

Hi @Mike Lubke ,

Any luck with this one? Getting exactly the same issue with custom field when trying to reach context.

Mike Lubke January 2, 2025

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:

 

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2024

Hi @Mike Lubke -- Welcome to the Atlassian Community!

With the delete operation, it seems the contextId must also be provided:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-contexts/#api-rest-api-3-field-fieldid-context-contextid-delete

Kind regards,
Bill

Mike Lubke November 8, 2024

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":{}}
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 8, 2024

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/#/

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events