Forums

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

Setting FixVersion via REST 5.0.2

Lee Correll
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.
April 16, 2012

I've got to be missing something simple here and I'm just not seeing it.

I'm attempting to use REST 5.0.2 to update a number of different issues - essentially, to put them into the same FixVersion / iteration from a flat file. Okay, so I'm looping around, calling the REST for each one, and I can update almost every field...except the FixVersion. I'm getting a "data is not an array" error, which leads me to believe that I need to pass it an array of FixVersions and set one as the correct FixVersion? That doesn't make any sense to me.

I've tried a number of different JSON configurations, all of which bombed (with some variant of the above.)

Can somebody point me in the right direction?

Thanks!

2 answers

1 accepted

0 votes
Answer accepted
tier-0 grump
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2012

You need to send a single value as an array, so

{ "update":
{
"fixVersions":
[
{"set": [ {"id":"10000"} ] }
]

}
}

0 votes
Dieter
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.
April 16, 2012
There is an example at https://developer.atlassian.com/display/JIRADEV/JIRA+REST+API+Example+-+Edit+issues#JIRARESTAPIExample-Editissues-Settingthecomponentsfield how to do it for the components field. It should work for versions equally
Dieter
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.
April 16, 2012
James is right, fixVersions is the field you need to replace for components in the tutorial. The field versions is for affected versions

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events