[AGILE-314] Order sprints on 'all sprints' by activity#24122
Merged
dombesz merged 2 commits intoJul 6, 2026
Conversation
... secondly, order by sprint dates and lastly by name
0324641 to
e3be878
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an “activity-based” ordering for Backlogs sprints on the All sprints page by introducing a dedicated Sprint.order_by_activity scope and switching the controller to use it.
Changes:
- Introduces
Sprint.order_by_activityto sort by status (active → in planning → completed), then by dates (descending), then by name. - Updates
Backlogs::SprintsController#indexto use the new ordering scope. - Adds unit coverage for the new scope and adjusts/extends feature coverage for the sprints index ordering & pagination expectations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/backlogs/app/models/sprints/scopes/order_by_activity.rb | Adds new scope implementing activity-based ordering. |
| modules/backlogs/app/models/sprint.rb | Registers the new order_by_activity scope on Sprint. |
| modules/backlogs/app/controllers/backlogs/sprints_controller.rb | Switches sprints index ordering from date+name to activity-based ordering. |
| modules/backlogs/spec/models/sprints/scopes/order_by_activity_spec.rb | Adds unit specs for the new ordering scope. |
| modules/backlogs/spec/features/backlogs/sprints/index_spec.rb | Updates feature coverage for the new ordering and adjusts pagination expectations accordingly. |
dombesz
approved these changes
Jul 6, 2026
dombesz
left a comment
Contributor
There was a problem hiding this comment.
Looks and works great, thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
https://community.openproject.org/wp/AGILE-314
What are you trying to accomplish?
Order sprints on the all sprints page by activity.
What approach did you choose and why?
Introduced a new scope
order_by_activity, it might be useful somewhere else (and it can be neatly unit-tested). The scope:Merge checklist