Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-71016

API Endpoint "/rest/api/3/issue/{issueIdOrKey}" returns 400 if accountId is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Low
    • Ecosystem
    • None

    Description

      Summary

      According to this documentation, in order to make an issue unassigned the name parameter in the request must be set to null.

      Since we're deprecating this parameter and replacing it for accountId, it should work exactly the same as it did with name. However, when setting the accountId to null, the REST api call returns Bad request

      Steps to replicate

      1. Create an issue and make sure that it's assigned to a user
      2. cUrl request:
        curl -X PUT \
          https://<instance_name>.atlassian.net/rest/api/3/issue/<issue_key> \
          -H 'Authorization: Basic <basic>' \
          -H 'Cache-Control: no-cache' \
          -H 'Content-Type: application/json' \
          -d '{ "accountId": null }'
        

      Expected behavior:

      • Should be able to update issue's assignee to unassigned.

      Actual behavior:

      • Bad request is returned:
        {"errorMessages":[],"errors":{"assignee":"expected Object containing a 'name' property"}}
        

      Additional details:

      • Problem can be reproduced with both accountId and id

      Attachments

        Issue Links

          Activity

            People

              bkelley@atlassian.com Ben Kelley
              lhubert@atlassian.com Leonardo H
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: