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 issue not showing on default board and add test #27720

Merged
merged 7 commits into from
Oct 25, 2023

Conversation

lng2020
Copy link
Member

@lng2020 lng2020 commented Oct 21, 2023

See #27718 (comment) . Add a test to ensure its behavior.
Why this test uses ProjectBoardID=0? Because in SearchOptions, ProjectBoardID=0 means what it is. But in IssueOptions, ProjectBoardID=0 means there is no condition, and ProjectBoardID=db.NoConditionID means the board ID = 0.
It's really confusing. Probably it's better to separate the db search engine and the other issue search code. It's really two different systems. As far as I can see, IssueOptions is not necessary for most of the code, which has very simple issue search conditions.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 21, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 21, 2023
@lng2020 lng2020 changed the title Fix issue not showing no default board and add tests Fix issue not showing on default board and add test Oct 21, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 24, 2023
@lunny lunny added the type/bug label Oct 25, 2023
@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 Oct 25, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 25, 2023
@lunny lunny enabled auto-merge (squash) October 25, 2023 09:59
@lunny lunny merged commit 1eae2aa into go-gitea:main Oct 25, 2023
25 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Oct 25, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 25, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 25, 2023
* giteaoffical/main:
  Fix issue not showing on default board and add test (go-gitea#27720)
  Show placeholder email in privacy popup (go-gitea#27770)
  Add word-break to organization name and description (go-gitea#26624)
  Add border to file tree 'sub-items' and add padding to 'item-file' (go-gitea#27593)
  Fix the missing repo count in new team page and edit team page (go-gitea#27743)
  Only show diff file tree when more than one file changed (go-gitea#27775)
  Add gap between diff boxes (go-gitea#27776)
@lng2020 lng2020 deleted the fix_defalult_board branch November 7, 2023 07:49
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this pull request Jan 17, 2024
See go-gitea#27718 (comment)
. Add a test to ensure its behavior.
Why this test uses `ProjectBoardID=0`? Because in `SearchOptions`,
`ProjectBoardID=0` means what it is. But in `IssueOptions`,
`ProjectBoardID=0` means there is no condition, and
`ProjectBoardID=db.NoConditionID` means the board ID = 0.
It's really confusing. Probably it's better to separate the db search
engine and the other issue search code. It's really two different
systems. As far as I can see, `IssueOptions` is not necessary for most
of the code, which has very simple issue search conditions.
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants