Get all sprints using GET /rest/agile/1.0/board/{boardId}/sprint returns pagination that does not conform to it's own documentation

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Low
    • Component/s: Backlog - Sprints
    • None
    • 2
    • Minor

      Issue Summary

      Get all sprints using GET /rest/agile/1.0/board/{boardId}/sprint returns pagination no longer returns the total so clients can’t work out how many times to loop round making a call to return the next page. Instead, there is an undocumented isLast boolean.

      Steps to Reproduce

      1. Create 2 sprints for a board. For example, let's say the boardId is 7.
      2. GET /rest/agile/1.0/board/{boardId}/sprint and add parameter maxResults=1. Using our example: /rest/agile/1.0/board/7/sprint?maxResults=1

      Expected Results

      Pagination follows the documented behavior:

      {
          "startAt" : 0,
          "maxResults" : 1,
          "total": 2,
          "values": [
              { /* result 0 */ }
          ]
      }
      

      Actual Results

      The results have an undocumented isLast boolean without total:

      {
        "maxResults": 1,
        "startAt": 0,
        "isLast": false,
        "values": [
          { /* result 0 */ }
        ]
      }
      

      Workaround

      Currently the workaround is to make requests until there isLast is true. This workaround prevents parallelization of requests, forcing all clients to perform the iteration in a single process.

            Assignee:
            Unassigned
            Reporter:
            devpartisan
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: