aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-05-17 17:21:35 +0800
committerGitHub <noreply@github.com>2023-05-17 17:21:35 +0800
commitb807d2f6205bf1ba60d3a543e8e1a16f7be956df (patch)
tree8f62ddf2edb4d870d95f9192c598ee0e2c41f80e /routers
parente7c2231dee356df5cbe5a47c07e31e3a8d090a6f (diff)
downloadgitea-b807d2f6205bf1ba60d3a543e8e1a16f7be956df.tar.gz
gitea-b807d2f6205bf1ba60d3a543e8e1a16f7be956df.zip
Support no label/assignee filter and batch clearing labels/assignees (#24707)
Since milestones has been implemented, this PR will fix #3407 --------- Co-authored-by: Jason Song <i@wolfogre.com>
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/issue.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go
index c2f30a01f4..66a4986139 100644
--- a/routers/web/repo/issue.go
+++ b/routers/web/repo/issue.go
@@ -170,8 +170,11 @@ func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption uti
repo := ctx.Repo.Repository
var labelIDs []int64
+ // 1,-2 means including label 1 and excluding label 2
+ // 0 means issues with no label
+ // blank means labels will not be filtered for issues
selectLabels := ctx.FormString("labels")
- if len(selectLabels) > 0 && selectLabels != "0" {
+ if len(selectLabels) > 0 {
labelIDs, err = base.StringsToInt64s(strings.Split(selectLabels, ","))
if err != nil {
ctx.ServerError("StringsToInt64s", err)