Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-26129

"incompleteIssuesDestinationId" parameter in the "/rest/agile/1.0/sprint/" endpoint is not working on recent Jira versions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 10.2.0
    • 9.12.4, 9.16.1, 9.17.4
    • REST API

      Issue Summary

      This is reproducible on Data Center: Yes.

      A customer reported that they can't move undone issues when completing a sprint through the /rest/agile/1.0/sprint/ endpoint by using the incompleteIssuesDestinationId parameter.

      I could also reproduce the issue on my end by using Postman. I could use the endpoint in different ways and using different methods. However, the only problem I noticed is that when changing the issuing state to closed and providing another sprint ID with the incompleteIssuesDestinationId parameter, the sprint gets closed; however, undone issues are sent back to the backlog.

      Steps to Reproduce

      1. On Jira 9.16 or 9.17.4, make sure you have an active sprint with a few issues.
      2. Create another sprint to possibly receive the undone issues.
      3. Get the sprint IDs by analyzing the FE requests like this:

      5. Use the /jira/rest/agile/1.0/sprint/3 endpoint to update the active sprint to the closed state and provide a request body like this, updating the parameters accordingly:
       

      { "incompleteIssuesDestinationId":4, "state":"closed", "name":"Test 4", "startDate":"2024-10-09T19:00:00.000-04:00", "endDate":"2024-10-21T19:00:00.000-04:00"   }

       
      6. Check the project backlog. Undone issues were sent to the backlog instead of the target sprint, in this case, sprint with Id 4.

      Expected Results

      Upon sprint closure via Rest API, the request sends all undone issues to the target sprint provided with the incompleteIssuesDestinationId.

      Actual Results

      Undone issues are sent to the backlog instead.

      Workaround

      When scripting, you can manually move those issues before the sprint closure by performing the steps below.

      1. Get all undone issues from the source sprint with the API request below:

      https://<JIRA_BASE_URL/rest/agile/1.0/sprint/<SOURCE_SPRINT_ID>/issue?jql=status%20!%3D%20Done

      2. Move the issue you got from the request above to the target sprint with the API request below:

      https://<JIRA_BASE_URL>/rest/agile/1.0/sprint/<TARGET_SPRINT_ID>/issue

      3. Then you can finally change the source sprint state with the /rest/agile/1.0/sprint/ using the POST or PUT method. The issues were already moved and won't go to the backlog.

              21d451cf00e1 Dominik Wojtasik
              3645502bbf60 Lucas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: