-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: unstable sort skips/duplicates issues across pages #18094
Conversation
Codecov Report
@@ Coverage Diff @@
## main #18094 +/- ##
=======================================
Coverage 44.89% 44.89%
=======================================
Files 824 824
Lines 91581 91589 +8
=======================================
+ Hits 41111 41116 +5
+ Misses 43879 43876 -3
- Partials 6591 6597 +6
Continue to review full report at Codecov.
|
models/issue.go
Outdated
case "project-column-sorting": | ||
sess.Asc("project_issue.sorting") | ||
sess.Asc("project_issue.sorting").Desc("issue.id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sess.Asc("project_issue.sorting").Desc("issue.id") | |
sess.Asc("project_issue.sorting").Asc("issue.id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how project issue sorting works. What's the reasoning here?
When viewing issues in sorted order, some issues are duplicated across pages and some are missing. This is caused by the lack of tie-breakers in database queries, making pagination inconsistent.
@lafriks can you also review this PR? |
Looks good from my side |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also LGTM. I think we can merge this, and if there is anything need to change, then we propose a new PR.
* giteaoffical/main: Fix: unstable sort skips/duplicates issues across pages (go-gitea#18094)
When viewing issues in sorted order, some issues are duplicated across pages and some are missing. This is caused by the lack of tie-breakers in database queries, making pagination inconsistent.
When viewing issues in sorted order, some issues are duplicated across pages and some are missing. This is caused by the lack of tie-breakers in database queries, making pagination inconsistent.
Fixes #13395.