Skip to content

Commit

Permalink
Fixing wrong paging when filtering on the issue dashboard (#19801)
Browse files Browse the repository at this point in the history
Fixes #19791 by adding an check if filtering after any repo; if yes, simply set the total count for the pageing to the sum of the issue count for each selected repo by utilize `issueCountByRepo`.

Fix #19791
  • Loading branch information
Mai-Lapyst authored Jun 4, 2022
1 parent 744e452 commit 090d89e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions routers/web/user/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,12 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
shownIssues = int(issueStats.ClosedCount)
ctx.Data["TotalIssueCount"] = shownIssues
}
if len(repoIDs) != 0 {
shownIssues = 0
for _, repoID := range repoIDs {
shownIssues += int(issueCountByRepo[repoID])
}
}

ctx.Data["IsShowClosed"] = isShowClosed

Expand Down

0 comments on commit 090d89e

Please sign in to comment.