|
|
|
@ -426,7 +426,7 @@ const (
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
// GetIssueStats returns issue statistic information by given conditions.
|
|
|
|
|
func GetIssueStats(repoID, uid, labelID int64, isShowClosed bool, filterMode int) *IssueStats { |
|
|
|
|
func GetIssueStats(repoID, uid, labelID, milestoneID int64, isShowClosed bool, filterMode int) *IssueStats { |
|
|
|
|
stats := &IssueStats{} |
|
|
|
|
issue := new(Issue) |
|
|
|
|
|
|
|
|
@ -434,6 +434,9 @@ func GetIssueStats(repoID, uid, labelID int64, isShowClosed bool, filterMode int
|
|
|
|
|
if labelID > 0 { |
|
|
|
|
queryStr += " AND issue.label_ids like '%$" + com.ToStr(labelID) + "|%'" |
|
|
|
|
} |
|
|
|
|
if milestoneID > 0 { |
|
|
|
|
queryStr += " AND milestone_id=" + com.ToStr(milestoneID) |
|
|
|
|
} |
|
|
|
|
switch filterMode { |
|
|
|
|
case FM_ALL: |
|
|
|
|
stats.OpenCount, _ = x.Where(queryStr, repoID, false).Count(issue) |
|
|
|
|