Uploaded image for project: 'Jira Align'
  1. Jira Align
  2. JIRAALIGN-4027

API 2.0 - When running a GET against a user the teams are not ordered so a Patch does not have consistent behavior

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 10.107.0
    • 10.105.3
    • REST API
    • 1
    • Severity 3 - Minor
    • No

    Description

      Issue Summary

      When a customer does a GET request on /users/

      {id}

      , the "teams" array keeps coming back in random order. They would like it to come back in the same order consistently.

      This is due to the customer adding teams via API and using path /teams/- in PATCH requests

      Steps to Reproduce

      1) Add one or more teams via Jira Align API using the path /teams/- in PATCH requests like so:

      [
          {
              "op": "add",
              "path": "/teams/-",
              "value": {
      		"teamId":1807
      	}
          }
      ]
      

      2) Run a GET call via Jira Align API to the following user endpoint:

      https://xxxxxxx.jiraalign.com/rest/align/api/2/users/{userid}
      

      Expected Results

      Team order in the array comes back consistently in the same order whenever a GET call is used against a user id

      Actual Results

      The the "teams" array keeps coming back in random order.

      Workaround

      The workaround (and possibly safer approach) is to get the user's current list of teams, parse the array and POST the user with a new array with the allowed teams only.

      Attachments

        Issue Links

          Activity

            People

              njones3@atlassian.com Nathan Jones (Inactive)
              kbaxley Kent Baxley
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync