- Create an agile board ('Board 1') with an active sprint.
- Create another sprint ('Sprint A') in that board so that it will become 'the next sprint'.
- Create another board ('Board 2') with an active sprint, which also has Sprint A as its next sprint.
- Perform the following two JQL queries:
- issueFunction in nextSprint('Board 1')
- issueFunction in nextSprint('Board 2')
Expected behaviour: The results for both queries are the issues in Sprint A.
Actual behaviour: Only query 1 returns the issues in Sprint A; query 2 returns no issues.
This is because our implementation of nextSprint uses SprintManager.getSprintsForView, which only considers sprints which are 'owned' by the view in question, rather than all those which actually appear on the view.