Trying to update fixVersion field using Jenkins "Jira Issue Results Updater"

Hello I am trying to Automate to update the fixVersion field of tickets in Jira using Jenkins "Jira Issue Results Updater. 


Ive used the following Parameters:

Jira REST Base URL: https://<IP:port>/jira/rest/api/2

Jira Custom field to be edited: fixVersion

Jira Custom field value: <value>


Bu the I am getting the error below:

Unable to connect to REST service to set field Server returned HTTP response code: 400 for URL


Also, I've tried a workaround by running a curl command which is:


curl -D- -u <username>:<password> -X PUT -d "{\"update\":{\"fixVersions\":[{\"set\":[{\"id\":\"<value>\"}]}]}}" -H "Content-Type: application/json" "https://<IP:Port>/jira/rest/api/2/issue/<issue-key>"

But I got the below:

HTTP/1.1 400 Bad Request

{"errorMessages":[],"errors":{"fixVersions":"Version id '<value>' is not valid"}}


Thanks in advance.

1 answer

I used your curl command and it worked just fine. It only broke with a 400 Bad Request when I used an invalid version ID value.

Maybe you're using the version name instead of ID. The ID value is the ID value stored in the database and not the version name.

An alternative to using the ID is using the NAME.



Using version's id:

curl -D- -u admin:pw -X PUT -d "{\"update\":{\"fixVersions\":[{\"set\":[{\"id\":\"10100\"}]}]}}" -H "Content-Type: application/json" "http://localhost:8080/rest/api/2/issue/SSP-22"

Using version's name:

curl -D- -u admin:pw -X PUT -d "{\"update\":{\"fixVersions\":[{\"set\":[{\"name\":\"v1\"}]}]}}" -H "Content-Type: application/json" "http://localhost:8080/rest/api/2/issue/SSP-22"

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,313 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot