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

Allow filtering issues by any assignee #33343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asvanberg
Copy link

This is the opposite of the "No assignee" filter, it will match all issues that have at least one assignee.

Before
Before change

After
After change with any filter

This is the opposite of the "No assignee" filter.

It will match all issues that have at least one assignee.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 21, 2025
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 21, 2025
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files labels Jan 21, 2025
@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 Jan 21, 2025
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

If I understand correctly, this PR only changes the db search logic.

But there are other search engines, would they go wrong? Correct me if I was wrong.

image

@GiteaBot GiteaBot added lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 21, 2025
@silverwind silverwind self-requested a review January 21, 2025 16:50
@asvanberg
Copy link
Author

If I understand correctly, this PR only changes the db search logic.

But there are other search engines, would they go wrong? Correct me if I was wrong.

I searched the code base to find where there was special logic for the db.NoConditionID relating to issue assignees and only found that place and changing it appeared to have solved it.

Looking at modules/indexer/issues/dboptions.go I can see that it converts the -1 (db.NoConditionID) to 0 before passing the search options to the indexers. I could attempt to propagate a magic value down to the indexers search options and handle it in bleve (and the other indexers too I assume) but if you don't want to keep using magic numbers that seems like it would just make a future migration to another datatype require more work?

@wxiaoguang
Copy link
Contributor

Without a complete refactoring, I could accept a non-conflicting magic number other than -2 at the moment (see the NonExistingID below), and I think it needs some tests to cover the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/blocked A maintainer has reservations with the PR and thus it cannot be merged modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants