Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Update customfield in JIRA using REST API

I am trying to use JIRA's Rest API to update bugs custom field

Here are the steps I followed:

1. Get the key of the custom field using the GET request -

https://nsssatheesh.atlassian.net/rest/api/2/issue/HI-2/editmeta

I get the response similar to -

... "customfield_10030": {      "required"false,      "schema": {        "type""array",        "items""user",        "custom""com.atlassian.jira.plugin.system.customfieldtypes:people",        "customId"10030,        "configuration": {          "isMulti"true        }      },      "name""Code-Reviewer-Approver",      "key""customfield_10030",      "autoCompleteUrl""https://nsssatheesh.atlassian.net/rest/api/1.0/users/picker?fieldName=customfield_10030&showAvatar=true&query=",      "operations": [        "add",        "set",        "remove"      ]    }...

 2. Create a PUT request using the following content

{    "update": 
{       "customfield_10030":  
[        
{           
"set": 
[            
{ "name": "Satheesh Nss" }          
]        
}      
]    
}  
}

 I am getting the response code - 204. But the customfield is not getting updated.

Could you please guide to fix this issue?

Thanks and regards,

Satheesh N

1 answer

1 accepted

0 votes
Answer accepted

I used accountid instead of name to update the value successfully.

Ref: 

Solved: Edit Assignee Using Jira REST API and User's Email (atlassian.com)

Solved: where can i find my Account ID (atlassian.com)

 

Request which has done the update:

{    "update": 
{       "customfield_10030":  
[        
{           "set": 
[            
{ "accountId": "557058:aeb07d9d-9850-4314-a997-52f213919ce7" }          
]        
}      
]    
}  
}

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,579 views 7 30
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you