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

Rest API Updating an issue fixVersion give error

sebastien maisonneuve October 15, 2013

Hi Community !

I'm trying to use the JIRA Rest API to update an Issue "Fix Version" to set it to a specific version. The current issue I update has some already created bad assignee ( the person assigned to it no more exist).

Using the normal Jira web interface, I am able to set the "Fix Version" to the desired value, even if the assignee is wrong.

Using the REST Issue PUT, I received an error : assignee: "User 'username' does not exist."

My REST call look like this (using chrome Advanced Rest Client and a C# implementation) :

Doing a PUT http://.../rest/api/2/issue/[issueId]/ Where [issueId] is the Id of my issue.

My payload is :

{

"update": {

"fixVersions" : [{"set":[{"name" : "Some Version"}]

}

]

}

}

1- Is it normal that I receive an error on the REST call while I can update the Issue from the web interface ?

2- Is there a way I can update this issue Fix Version by REST without changing the assignee ?

Thanks !

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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

Unfortuantely, you've fallen upon one of the oddities of the new inline editing. With REST we do issue validation, so all fields must be valid, the UI has inline editing, so only validates the field being edited. As you've guessed if you set the assignee correctly in the PUT, then it would be fine.

sebastien maisonneuve October 16, 2013

Thanks for your quick answer. Do you think of any workaround I could use ( by rest api ) to be able to update the issue anyway without changing the assignee ? I guess no workaround is possible, but I ask in case ;) If no workaround, I will manage/expect this 'possibility' of have validation error on other fields that the one I changed.

Ulf Röttger April 18, 2014

Hey,

I have a partially similar issue. I use a Python-REST-API implementation. There is no error regarding the username

But: adding or setting a fixVersion via API call actually deletes the exisiting fixVersion if there is any but does not set/add a new one, if there is none nothing happens.

The actions is shown in the log accordingly. As if the two verbs always result in deleting.

Any ideas?

Thanks in advance.

Ulf

Peter Test April 27, 2014

Ulf,

I also need to add a new version to a previously populated fixVersion field, and like you I need to maintain existing versions already present in that field.

Can you do a get of the existing version string and then perform an add/set using the read version plus your new version.

Have you come across any solutions?

Ulf Röttger April 28, 2014

Hi Peter

Sorry to say, no success. I tried a lot, but at last gave up. Just didn't work as expected. The documentation still says something about "work in progress"

https://developer.atlassian.com/display/JIRADEV/Updating+an+Issue+via+the+JIRA+REST+APIs

So I think waiting is an option...

Cheers,

Ulf

TAGS
AUG Leaders

Atlassian Community Events