Unable to add more than 1 issue link using REST API

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Medium
    • None
    • Affects Version/s: 7.13.5, 8.3.3, 8.5.19, 8.20.25, 9.4.9, 9.6.0, 9.10.1
    • Component/s: REST API
    • None
    • 7.13
    • 6
    • Severity 3 - Minor
    • 9

      Summary

      Unable to add more than 1 issue link when creating/editing an issue via REST API

      Steps to Reproduce

      1. Run PUT /rest/api/2/issue/{issueIdOrKey} with the following JSON data
        {
           "update":{
              "issuelinks":[
                 {
                    "add":{
                       "type":{
                          "name":"Blocks",
                          "inward":"is blocked by",
                          "outward":"blocks"
                       },
                       "outwardIssue":{
                          "key":"TEST-1"
                       }
                    }
                 },
                 {
                    "add":{
                       "type":{
                          "name":"Blocks",
                          "inward":"is blocked by",
                          "outward":"blocks"
                       },
                       "outwardIssue":{
                          "key":"TEST-2"
                       }
                    }
                 }
              ]
           }
        }

      Expected Results

      Issue is updated with 2 issue links

      Actual Results

      Following is seen as response

      {
          "errorMessages": [],
          "errors": {
              "issuelinks": "Too many operations (2) provided for field 'issuelinks'. We support at most 1 operation for this field."
          }
      }

      Notes

      AFAICT there is no reason for this limitation. You can create multiple issue links and you can add multiple labels for example using a similar JSON as the above since it's an array.

      Workaround

      Add issue links one at a time using multiple REST calls.

            Assignee:
            Unassigned
            Reporter:
            Yit Wei
            Votes:
            130 Vote for this issue
            Watchers:
            89 Start watching this issue

              Created:
              Updated: