Forums

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

Using the Rest API to add 2 fixVersions to an issue

Alex Cumberland
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.
May 4, 2020

Is there a way via a Rest API call to add 2 fixVersions to an issue ?

 

Currently I am calling from a .NET program a call as follows to add one fixVersion but in some instances I need to add a second fixVersion value.

 

Rest call is to :   rest/api/latest/issue/<issueID>

 

In the Body:

{
        "DefectId": <issueID>,
          "fields": {
                "fixVersions": [
                     {
                         "id":  <fix version ID>
                      }
                 ]
        }
}

This format is great and adds the Version that I pass to the value.  But I can not get it to accept a second fix version or can find an example in the Rest Documentation that shows more then just single fixversion being added.   I know the field can accept more than one as through the UI I can manually add the second and even more versions to the fixVersion field.

 

Any help would be greatly appreciated.

1 answer

1 accepted

1 vote
Answer accepted
Alex Cumberland
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.
May 12, 2020

Found a way to do it.

 

Rest call is to :   rest/api/latest/issue/<issueID>

 

Body:

{
     "update": {
           "fixVersions": [
                      {
                        "set": [
                               { 
                                     "name": "Version 1"
                                },
                                {
                                       "name": "Version 2"
                                 }
                         ]
                     }
             ]
       }
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.8.1
TAGS
AUG Leaders

Atlassian Community Events