Cannot edit labels with REST

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Medium
    • None
    • Affects Version/s: None
    • Component/s: Issue - Fields, REST API
    • None

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      https://developer.atlassian.com/display/JIRADEV/Updating+an+Issue+via+the+JIRA+REST+APIs has an example showing how to update the labels field

      ADD: Adds an element to a field that is an array. The incoming value must be the same shape as the items of the array in a GET. For example, to add a label:
      { "update": { "labels": [ {"add": "newlabel"} ] } }
      

      But it fails with

      curl -u 'mdoar:secret' -H "Content-Type: application/json" -X PUT --data '{ "update": { "labels": [ {"add": "newlabel"} ] } }' https://jira.atlassian.com/rest/api/latest/issue/TST-29105
      
      {"errorMessages":[],"errors":{"labels":"Field 'labels' cannot be set. It is not on the appropriate screen, or unknown."}}
      

            Assignee:
            Matt Quail (Inactive)
            Reporter:
            MattS
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: