We have a scrum board with an active sprint and several future sprints. I'm trying to do a JQL filter for the tickets to show all the issues from active and future sprint in the order shown on the board
project = ABCZ AND type not in (subTaskIssueTypes()) and sprint in (openSprints(), futureSprints()) ORDER BY Rank ASC
Results aren't being displayed in rank order but when I remove
futureSprints()) it shows the results of the current sprint in rank order.
Not sure what's happening, can you help out ?
When you say "in the same order" as shown on the board, what do you mean?
On the Backlog with each open and future sprint display, within each sprint you see the ranking of the issues. However that ranking does not necessarily represent the ranking of the issues if they were all in a single group
With a board you can display all the issues from all open sprints, but again if the issues are in different statuses that also doesn't show you the ranking compared to issues in other statuses.
Ranking is relative in Jira. It does not take into consideration association to a sprint (past, current, or future).
These two articles may help you understand it more completely.
Yes same order from the board,
When I only filter the current sprint, I see the correct order. Changing the order from the scrum board also update the JQL results (only with ''sprint in (openSprints()'' which is what I expect.
When I add futureSprints()) to that JQL, that's where the order is not right. Also all the tickets planned for future sprints are in an open state.
The Rank of the issues is not changed by simply being added to a sprint nor by undergoing a status change. Let me try to demonstrate.
Let us start with a simple Scrum project with 6 stories that are all currently in the backlog.
If we look at the results for the filter for this board, it shows the issues in the same order.
Now let us create a sprint and add DR-3 to it. Remember, adding the issue to a sprint does not impact rank. As Jira sees it, DR-3 still has a lower rank than DR-2 and a higher rank than DR-4. This can be seen in the output of the board filter.
Now let us put DR-4 into the sprint, and place it above DR-3. By changing its position relative to another story that changes its rank. We are indicating it is a higher rank than DR-3.
But we previously indicated that DR-3 was a lower rank than DR-2. The positioning of DR-4 above DR-3 changes DR-4's rank relative to DR-3, but does not change its rank relative to DR-2. This is shown in a refresh of the board filter output.
As I said, simply putting issues into sprints does not change their rank. The rank is only relative to other issues, and applies across the entire set of issues within the scope of the boards filter. Jira keeps track for each issue which is is ranked above it and which is ranked below it. When we put DR-4 above DR-3, that only changes the rank of DR-4 and DR-3 respectively. Other issues ranked above DR-3 remain above DR-4, and issues that were below DR-4 remain below DR-3. One issue is being pulled from its position and pushed in between two others.
Again, let me say that whether that issue is in an Active sprint, a Future sprint, or the Backlog, or has its status changed, those things have no impact on its rank.
When you filter for only the open Sprint issues, you will see just those issues as they are ranked relative to each other. That will match what you see in the Backlog screen for that one sprint. When you add to your filter the future sprints or the issues not in any sprint, you will see the issues interwoven based on the ranking of all the issues in the set relative to each other.
The results of the filter are correct (I expect). If you edited each issue directly and removed the Sprint values from each issue directly, not by dragging them from the sprints on the Backlog screen, all those issues would return to the Backlog and display as per their ranking within the entire set of board. If you then ran a filter for all the issues in the board not in a sprint and ordered it by Rank, you would see that it would match the order of the issues in the Backlog.
I hope that helps explain what you see.