Forums

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

Delete custom field from database, command line or using api call

Vishal
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.
May 9, 2022

Hi Guys,

I was trying to modify a custom field width as per article https://confluence.atlassian.com/jirakb/custom-field-width-less-than-available-options-length-240912344.html by updating field description, however, something went wrong while saving it & now I am unable to change anything with the field or the fields which are on same pages as that of the affected field, the page keeps on buffering even though the search is complete & everything else is greyed out.

 

I am quite sure the issue is because of the code that I have inserted into the description of the field, this is blocking me even creating tickets into the project where ever I have used the field, as a work around, I have removed that field from all the screens & created another field with same name.

Now, I would like to get rid of the origional field but as the screen gets greyed out I can't even delete the field, so is there a way to delet a field using api call or from DB directly ?

If anyone knows, please share it. Attaching image for reference, where you can see the screen buffering even though the search is complete.

Custom Field Error.JPGThanks in advance!

 

2 answers

1 accepted

1 vote
Answer accepted
Vishal
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.
May 9, 2022

For those looking for answer, This was a lot easier than I thought, I had created series of custom fields so it was not difficult to find the field ID based on previous & next custom fields which I had created, I had clicked on edit field on one of the field & then in the edit mode changed the field id with the currupted field id in the url (https://my.atlassian.com/secure/admin/EditCustomField!default.jspa?id=xxxxx), which redirected me to description of the field, removed the custom code which I had copied in there & saved it, problem solved.

Thanks

1 vote
Ed Gaile _Atlanta_ GA_
Community Champion
May 9, 2022

Vishal -

Do you have access to the Jira DB schema?  If so you can just find the ID for the custom field and look that up in a DB client.  You can see the Javascript in the description and remove it.

See screen shot.

custom-field-1.png

Suggest an answer

Log in or Sign up to answer