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

The "all" count on a user's Pull Requests page is misleading #20574

Closed
parnic opened this issue Jul 31, 2022 · 6 comments · Fixed by #20785
Closed

The "all" count on a user's Pull Requests page is misleading #20574

parnic opened this issue Jul 31, 2022 · 6 comments · Fixed by #20785
Labels
Milestone

Comments

@parnic
Copy link
Contributor

parnic commented Jul 31, 2022

Description

When clicking around on the PRs from a user's Pull Requests page (the button in the main site header, e.g.: https://try.gitea.io/pulls), "All" is selected by default and shows the total count of all PRs in all repos.

image

Clicking on one of the repos, however, causes the "All" count to change to whatever is highlighted instead of showing the composite total:

image

image

image

I feel like All was always showing the total count in 1.16.9, but is exhibiting this behavior in 1.17.0. I am not sure if All is supposed to indicate "the number we're showing you based on your selection" or "the number we'd be showing you if you clicked on this". I tend to assume it should be the latter based on how the individual repos behave.

Gitea Version

1.17.0, 1.18.0+dev-193-g335e918b1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Git Version

2.37.1

Operating System

Linux

How are you running Gitea?

Ubuntu apt package

Database

PostgreSQL

@noerw
Copy link
Member

noerw commented Jul 31, 2022

This is a regression from #20454.
The code for generating this page is complex as fuck, so I'm not suprised this regressed 😅

@noerw noerw added this to the 1.17.1 milestone Jul 31, 2022
parnic added a commit to parnic/gitea that referenced this issue Aug 13, 2022
This fixes a problem where the "All" line item on the Issues or Pull Requests page was only showing the count of the selected repos instead of the total of all issues/prs in all repos.

The "total number of shown issues" number is now stashed in a different context variable in case it wants to be used by the frontend later. It's currently not being used.

Fixes go-gitea#20574
parnic added a commit to parnic/gitea that referenced this issue Aug 15, 2022
Backport go-gitea#20785

This fixes a problem where the "All" line item on the Issues or Pull Requests page was only showing the count of the selected repos instead of the total of all issues/prs in all repos.

The "total number of shown issues" number is now stashed in a different context variable in case it wants to be used by the frontend later. It's currently not being used.

Fixes go-gitea#20574
@lunny
Copy link
Member

lunny commented Aug 16, 2022

#20454

Since it's only in 1.18.0, I don't think it needs to be added to milestone 1.17.1

@lunny lunny removed this from the 1.17.1 milestone Aug 16, 2022
@parnic
Copy link
Contributor Author

parnic commented Aug 16, 2022

#20454

Since it's only in 1.18.0, I don't think it needs to be added to milestone 1.17.1

This bug definitely exists in 1.17.0. I logged the issue when I noticed it after our upgrade. I don't think the quoted pr is accurate for when this was introduced.

@noerw
Copy link
Member

noerw commented Aug 16, 2022

I don't think the quoted pr is accurate for when this was introduced.

I carefully did a git bisect, I'm certain it's that commit.

Since it's only in 1.18.0, I don't think it needs to be added to milestone 1.17.1

The change was backported to 1.17, so 1.17.1 is the appropriate target.

@lunny lunny added this to the 1.17.1 milestone Aug 16, 2022
@lunny
Copy link
Member

lunny commented Aug 17, 2022

fixed by #20496

@lunny lunny closed this as completed Aug 17, 2022
@parnic
Copy link
Contributor Author

parnic commented Aug 17, 2022

fixed by #20496

#20496 is the one that caused the problem. The fix, #20785, is still waiting to be merged and then needs a backport. I'll get the backport posted today.

lunny added a commit that referenced this issue Aug 17, 2022
* Use the total issue count for UI

This fixes a problem where the "All" line item on the Issues or Pull Requests page was only showing the count of the selected repos instead of the total of all issues/prs in all repos.

The "total number of shown issues" number is now stashed in a different context variable in case it wants to be used by the frontend later. It's currently not being used.

Fixes #20574

* Remove unused context variable

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
techknowlogick pushed a commit that referenced this issue Aug 17, 2022
Backport #20785

This fixes a problem where the "All" line item on the Issues or Pull Requests page was only showing the count of the selected repos instead of the total of all issues/prs in all repos.

The "total number of shown issues" number is now stashed in a different context variable in case it wants to be used by the frontend later. It's currently not being used.

Fixes #20574
vsysoev pushed a commit to IntegraSDL/gitea that referenced this issue Aug 28, 2022
* Use the total issue count for UI

This fixes a problem where the "All" line item on the Issues or Pull Requests page was only showing the count of the selected repos instead of the total of all issues/prs in all repos.

The "total number of shown issues" number is now stashed in a different context variable in case it wants to be used by the frontend later. It's currently not being used.

Fixes go-gitea#20574

* Remove unused context variable

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@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.

3 participants