setting project picker value to 'None' using Jira Rest API

Deleted user December 28, 2021

I want to update the 'project picker' value to None using Jira REST API for my script.

Below is the Json body that I am using to update project picker field value to None:

{
     "fields": {"customfield_12001":{}
This gives 400 error code. I am passing empty body. In my case, say customfield_12001 is Project picker field id.
Note: The above code - passing empty body to set value to None - works perfectly fine for user picker, version picker and all other Jira picker fields.

1 answer

1 accepted

0 votes
Answer accepted
Vishwas
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.
December 28, 2021

Hi @[deleted] 

Welcome to Atlassian Community !!

I am also still new to Jira API. but just a suggestion. Did you try providing null value like this ?

"customfield_10200": null

 Lets also take inputs from other Community Experts.

 

Regards,

Vishwas

Deleted user December 30, 2021

Thank you @Vishwas 

Above suggestion has worked.

In the process I found that it can also be solved using below piece of code

"customfield_12001":{"id":"0"}  

 

Just wondering, why "customfield_12001":{} (empty json body) does not work in case of project picker. 

 

Regards,

Dheeraj

Like Vishwas likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events