Forums

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

post value to custom field in jira

Manish Amatya August 17, 2020

i am trying to update value to customfield in jira using curl but its not posting.  I am using following command

 

curl --insecure -u "username":$(cat password.txt) -X POST --data '{"fields":{customfield_10325":"value":"test1"}}' -H "content-Type:application/json" "url"/rest/api/2/issue/Test

 

 

Test is my issue

1 answer

1 accepted

0 votes
Answer accepted
Florian
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.
August 17, 2020

I did not try it. But at a first glance it look a like a syntax error in your post data. Try to wrap "value":"test1" in curly braces and add an opening quotation before customfield like this: 

{"fields":{"customfield_10325": { "value":"test1"} } }

Additionally you should specify a valid issue key. Test does not look valid in my eyes. Test-123 looks better, as each issue always has a unique numerical suffix. 

Manish Amatya August 17, 2020

Tried the above  .does not throw out any error but doesn't post too..Test 1 is the value i wanted to post in the customfield

Suggest an answer

Log in or Sign up to answer