Skip to content
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

Use the total issue count for UI #20785

Merged
merged 5 commits into from
Aug 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions routers/web/user/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,17 +607,22 @@ func buildIssueOverview(ctx *context.Context, unitType unit.Type) {
var shownIssues int
if !isShowClosed {
shownIssues = int(issueStats.OpenCount)
ctx.Data["TotalIssueCount"] = shownIssues
} else {
shownIssues = int(issueStats.ClosedCount)
ctx.Data["TotalIssueCount"] = shownIssues
}
if len(repoIDs) != 0 {
shownIssues = 0
for _, repoID := range repoIDs {
shownIssues += int(issueCountByRepo[repoID])
}
}

var allIssueCount int64
for _, issueCount := range issueCountByRepo {
allIssueCount += issueCount
}
ctx.Data["TotalIssueCount"] = allIssueCount

if len(repoIDs) == 1 {
repo := showReposMap[repoIDs[0]]
if repo != nil {
Expand Down