Fix dashboard issues labels filter bug (#14210)

Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
Lunny Xiao 2021-01-02 01:49:42 +08:00 committed by GitHub
parent a07e67d9cc
commit 21adeaad70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 12 deletions

View file

@ -580,6 +580,7 @@ func Issues(ctx *context.Context) {
FilterMode: filterMode,
IsPull: isPullList,
IsClosed: isShowClosed,
LabelIDs: opts.LabelIDs,
}
if len(repoIDs) > 0 {
userIssueStatsOpts.UserRepoIDs = repoIDs
@ -599,6 +600,7 @@ func Issues(ctx *context.Context) {
IsPull: isPullList,
IsClosed: isShowClosed,
IssueIDs: issueIDsFromSearch,
LabelIDs: opts.LabelIDs,
}
if len(repoIDs) > 0 {
statsOpts.RepoIDs = repoIDs
@ -621,6 +623,7 @@ func Issues(ctx *context.Context) {
IsPull: isPullList,
IsClosed: isShowClosed,
IssueIDs: issueIDsFromSearch,
LabelIDs: opts.LabelIDs,
})
if err != nil {
ctx.ServerError("GetUserIssueStats All", err)
@ -672,6 +675,7 @@ func Issues(ctx *context.Context) {
ctx.Data["RepoIDs"] = repoIDs
ctx.Data["IsShowClosed"] = isShowClosed
ctx.Data["TotalIssueCount"] = totalIssues
ctx.Data["SelectLabels"] = selectLabels
if isShowClosed {
ctx.Data["State"] = "closed"