Forums

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

Jira service desk api to bulk delete all the custom field options\values

Ninad Desai
Contributor
September 30, 2021

Hi Team,

Is there any Jira service desk API available to bulk delete all the custom field options that we would have passed as drop-down values previously for the custom field?

I could see below API but it would require first optionId to be figured out for every custom field value and pass as a input. In my case, I want to delete all of those without passing optionId.

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

 

Thank you in advance.


Regards,
Ninad

2 answers

1 accepted

2 votes
Answer accepted
Kishan Sharma
Community Champion
October 2, 2021

Hi @Ninad Desai You can simply get all the custom field options first and then loop through all of them to delete those one by one. Refer this thread for some inspiration.

Ninad Desai
Contributor
October 4, 2021

Hi @Kishan Sharma ,

Thanks for the suggestion and yes, I had implemented it in the same way last week as workaround: where I am pulled all of the options ID of all those custom fields options/values and looped over to delete them using the available API call mentioned here:

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



Regards,
Ninad

Like Kishan Sharma likes this
Kishan Sharma
Community Champion
October 4, 2021

Great Ninad, thanks for sharing :)

2 votes
Ninad Desai
Contributor
October 1, 2021

Hi @Nic Brough -Adaptavist-,

 

Could you advise on my this quest for atlassian API to bulk delete options from custom field dropdown


Regards,
Ninad

Nic Brough -Adaptavist-
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.
October 1, 2021

All I have is the link you've found already!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events