Cannot Update multiple issuelinks

Will Harris April 20, 2017

I am trying to create an issue using: https://jira.ghs.com/rest/api/2/issue

When I create the issue I am using "update" to add "issuelinks".  I can add one issue link no problem, but I need to add multiple.

I am using JIRA v6.1.7.

The error I am getting when adding multiple issue links is:

{"errorMessages":[],"errors":{"issuelinks":"Can not deserialize instance of com.atlassian.jira.issue.fields.rest.json.beans.LinkIssueRequestJsonBean out of START_ARRAY token\n at [Source: N/A; line: -1, column: -1]"}}

Below is my json:

{
   "fields":{
      "project":{
         "key":"TEQA"
      },
      "assignee":{
         "name":"wharris"
      },
      "issuetype":{
         "name":"Test"
      },
      "description":"This is a test",
      "summary":"Test Jira Creation"
   },
   "update":{
      "issuelinks":[
         {
            "add":[
               {
                  "outwardIssue":{
                     "key":"TEQA-1111"
                  },
                  "type":{
                     "name":"Component Link"
                  }
               },
               {
                  "outwardIssue":{
                     "key":"VIRT-2222"
                  },
                  "type":{
                     "name":"Link"
                  }
               },
               {
                  "outwardIssue":{
                     "key":"VIRT-627"
                  },
                  "type":{
                     "name":"Link"
                  }
               }
            ]
         }
      ]
   }
}

 

1 answer

0 votes
Fabio Racobaldo _Herzum_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 2022

Hi @Will Harris ,

did u try to add multiple links within the following dedicated rest api https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/#api/2/issueLink-linkIssues ?

Fabio

Suggest an answer

Log in or Sign up to answer