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

How to update "resolution description"(custom field) field via REST API?

Nuwan September 11, 2015

I have passed following jason string to update resolution description via REST but no sign of working it.

{\"update\": {\"resolution description \": [{ \"add\": { \"body\": \"" + errors + "\" }}]}}

errors is a variable with hard-coded value.

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Taha Khanzada
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.
September 11, 2015

The fields that can be updated, in either the fields parameter or the update parameter, can be determined using the /rest/api/2/issue/{issueIdOrKey}/editmeta resource. 

For customfield I think instead of Update you need to use fields in JSON

Replace below code with Resolution description field id and try

{"fields": {

"customfield_10000": "This is a shorthand for a set operation on a text custom field"
}
}


Taha

Nuwan September 12, 2015

this custom filed should be updated while the "resolution" changed to "fixed" so I used the "transition" rest api call to do it.the problem is the resolution field is updated as "fixed" but the custom field is not updated as expected. can't I change those two field with "transition" rest api call? thanks in advance!.

Taha Khanzada
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.
September 13, 2015

It would have been more clear if you mentioned about transition earlier. Anyways now for transition the fields that can be set, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/{issueIdOrKey}/transitions?expand=transitions.fields resource. If a field is not configured to appear on the transition screen, then it will not be in the transition metadata, and a field validation error will occur if it is submitted.

Taha Khanzada
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.
September 13, 2015

So basically you need this code { "fields": { "customfield_id": {"This is a shorthand for a set operation on a text custom field"}, "resolution": {"name": "Fixed"} }, "transition": { "id": "5" } }

0 votes
iuliia1818 December 18, 2015

Hi,

one question: How can you use /rest/api/2/issue/{issueIdOrKey}/editmeta when it has only get method??

I check it one more time with REST BROWSER and it has only get! So how can you update with get??

 

Thank you

0 votes
Taha Khanzada
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.
September 11, 2015

Is Resolution description customfield ? 

Nuwan September 11, 2015

yes its a custom field

TAGS
AUG Leaders

Atlassian Community Events