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

0 votes

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 Sign up to answer
Community showcase
Published Wednesday in Jira

Make your Atlassian Cloud products more secure: our NEW admin security guide

Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...

258 views 0 6
Read article

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