Skip to content

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

Conversation

tyroneyeh
Copy link
Contributor

Hello,
Sorry, this is my first time to open a pull request, sorry for any mistakes
For Closes #3407 issue

@tyroneyeh tyroneyeh changed the title Add no labels and no milestones and no assignees filters. Add no labels and no milestones and no assignees filters. (#3407) Jun 20, 2022
@lunny lunny added this to the 1.18.0 milestone Jun 20, 2022
@lunny lunny added the type/enhancement An improvement of existing functionality label Jun 20, 2022
@6543 6543 changed the title Add no labels and no milestones and no assignees filters. (#3407) Add no labels and no milestones and no assignees filters Jun 20, 2022
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 20, 2022
@6543
Copy link
Member

6543 commented Jun 20, 2022

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

@tyroneyeh
Copy link
Contributor Author

Upload test movie.

2022-06-21.23.23.01.mov

@tyroneyeh
Copy link
Contributor Author

Hello

I rewrote the code, please review it again

Thanks

@tyroneyeh tyroneyeh requested a review from 6543 July 5, 2022 03:24
@tyroneyeh tyroneyeh mentioned this pull request Jul 8, 2022
7 tasks
@lunny
Copy link
Member

lunny commented Oct 19, 2022

The condition No label issue means the issue hasn't been assigned any label.
Excluded labels means the issues which doesn't has the special labels.
They are not equal conditions.

@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 20, 2022
@@ -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").
Copy link
Member

Choose a reason for hiding this comment

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

Use NotExist is better.

Copy link
Member

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()

Copy link
Member

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
Copy link
Member

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.

Copy link
Member

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

Copy link
Member

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?

@lunny lunny modified the milestones: 1.18.0, 1.19.0 Oct 26, 2022
@lunny lunny modified the milestones: 1.19.0, 1.20.0 Jan 31, 2023
@tyroneyeh tyroneyeh closed this Feb 17, 2023
@lunny lunny removed this from the 1.20.0 milestone Feb 17, 2023
@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
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "no label" and "no milestone" filters
4 participants