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

Fix project issues list and counting #33594

Merged
merged 21 commits into from
Feb 17, 2025

Conversation

lunny
Copy link
Member

@lunny lunny commented Feb 14, 2025

No description provided.

@lunny lunny added type/bug backport/v1.23 This PR should be backported to Gitea 1.23 labels Feb 14, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 14, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 14, 2025
@github-actions github-actions bot added modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Feb 14, 2025
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 15, 2025
@lunny lunny force-pushed the lunny/fix_project_issues_list branch from 1bc5c2c to 5878ceb Compare February 15, 2025 20:13
@lunny lunny marked this pull request as ready for review February 16, 2025 05:19
@lunny lunny requested review from lafriks, wxiaoguang and 6543 February 16, 2025 05:31

// MustDefaultColumn returns the default column for a project, get the first one if exist one and creating one if it does not exist
func (p *Project) MustDefaultColumn(ctx context.Context) (*Column, error) {
c, err := p.getDefaultColumn(ctx)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Desc(id) in the called method seems incorrect.
Shouldn't it be Asc(sorting, id) instead?
(even if it might be potentially minimally breaking if someone misconfigured their projects)

Copy link
Member Author

@lunny lunny Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's already OrderBy("sorting, id")?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@wxiaoguang wxiaoguang Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think it should change the existing logic in getDefaultColumn

The old logic means this: use the latest default one. It doesn't care about "sorting" or not. There should be only one "default" column, the "order by" is just a fallback.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Feb 16, 2025
wxiaoguang
wxiaoguang previously approved these changes Feb 17, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 17, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Feb 17, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Feb 17, 2025
@wxiaoguang wxiaoguang enabled auto-merge (squash) February 17, 2025 04:49
@wxiaoguang wxiaoguang merged commit 69de5a6 into go-gitea:main Feb 17, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.24.0 milestone Feb 17, 2025
@lunny lunny deleted the lunny/fix_project_issues_list branch February 17, 2025 05:20
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Feb 17, 2025
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Feb 17, 2025
wxiaoguang added a commit that referenced this pull request Feb 17, 2025
Backport #33594 by lunny

---------

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 18, 2025
* giteaofficial/main:
  Make actions URL in commit status webhooks absolute (go-gitea#33620)
  Refactor error system (go-gitea#33626)
  Move issue pin to an standalone table for querying performance (go-gitea#33452)
  Run spellcheck on tools directory (go-gitea#33627)
  Refactor error system (go-gitea#33610)
  Fix project issues list and counting (go-gitea#33594)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.23 This PR should be backported to Gitea 1.23 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants