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

Cannot edit labels with REST

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Medium
    • None
    • None
    • Issue - Fields, REST API
    • None

    Description

      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."}}
      

      Attachments

        Issue Links

          Activity

            People

              mquail Matt Quail (Inactive)
              73d805a2526b MattS
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: