Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-66329

Unable to add more than 1 issue link using REST API

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 7.13.5, 8.3.3, 8.5.19, 9.6.0, 8.20.25, 9.4.9, 9.10.1
    • REST API
    • None

      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.

              Unassigned Unassigned
              ywoo Yit Wei
              Votes:
              125 Vote for this issue
              Watchers:
              87 Start watching this issue

                Created:
                Updated: