-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add no labels and no milestones and no assignees filters #20047
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
Add no labels and no milestones and no assignees filters #20047
Conversation
sorry that xorm.Builder is not the easyest thing for beginners - but we have to keep in mind that we had to refactor stuff because it used slices for conditions that just went to big so gitea got slow or just did not work at all anymore |
Upload test movie. 2022-06-21.23.23.01.mov |
Hello I rewrote the code, please review it again Thanks |
The condition |
@@ -1449,6 +1462,11 @@ func issuePullAccessibleRepoCond(repoIDstr string, userID int64, org *organizati | |||
} | |||
|
|||
func applyAssigneeCondition(sess *xorm.Session, assigneeID int64) *xorm.Session { | |||
if assigneeID == -1 { | |||
return sess.Join("LEFT", "issue_assignees", "issue.id = issue_assignees.issue_id"). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use NotExist
is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you provide an example - never saw an example of builder.NotExists()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you provide an example - never saw an example of
builder.NotExists()
I have done that in the previous comment.
@@ -1344,14 +1348,23 @@ func (opts *IssuesOptions) setupSessionNoLimit(sess *xorm.Session) { | |||
} | |||
|
|||
if opts.LabelIDs != nil { | |||
var noLabelsIDs []int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are excluded Labels, not no Label. So you still missed real No Label issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is done by set all lables who you dould select as exclude ...
... so it works
the question is if se should use a keyword instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are hundreds labels in this repository, it's difficult to select labels from the UI?
Hello,
Sorry, this is my first time to open a pull request, sorry for any mistakes
For Closes #3407 issue