Skip to content
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

Paging of User Issue List across repos does not change pagecount when applying filters #19791

Closed
Mai-Lapyst opened this issue May 24, 2022 · 1 comment · Fixed by #19801
Closed
Labels
Milestone

Comments

@Mai-Lapyst
Copy link
Contributor

Description

When on the issue list that displays all issues open in your repositories, the pagination always uses the absolute issue count instead of only the issues currently visible due to filtering.

Gitea Version

1.16.8

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Screenshot from try.gitea.io:
image

Git Version

No response

Operating System

No response

How are you running Gitea?

binary installation from https://docs.gitea.io/en-us/install-from-binary/; also try.gitea.io

Database

MySQL

@lunny lunny added this to the 1.16.9 milestone May 24, 2022
@Mai-Lapyst
Copy link
Contributor Author

Did a bit of diging and found the source of it: the problem is that the route only fills in the pagination with the total open/close count, but dosn't respect any selected repos:

var shownIssues int
if !isShowClosed {
shownIssues = int(issueStats.OpenCount)
ctx.Data["TotalIssueCount"] = shownIssues
} else {
shownIssues = int(issueStats.ClosedCount)
ctx.Data["TotalIssueCount"] = shownIssues
}

This should be an easy fix... will open an PR for this to fix it on master.

zeripath pushed a commit that referenced this issue Jun 4, 2022
Fixes #19791 by adding an check if filtering after any repo; if yes, simply set the total count for the pageing to the sum of the issue count for each selected repo by utilize `issueCountByRepo`.

Fix #19791
AbdulrhmnGhanem pushed a commit to kitspace/gitea that referenced this issue Aug 24, 2022
…9801)

Fixes go-gitea#19791 by adding an check if filtering after any repo; if yes, simply set the total count for the pageing to the sum of the issue count for each selected repo by utilize `issueCountByRepo`.

Fix go-gitea#19791
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants