diff options
author | Unknwon <u@gogs.io> | 2015-08-05 20:52:17 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-08-05 20:52:17 +0800 |
commit | 34795770c337c3bfcc56600a41a9c4bec31d0a8e (patch) | |
tree | d696363493307eb70d71813db8e82fc8e2c91830 /models/issue.go | |
parent | 81d01aa308142aa368784ecd551601158422650d (diff) | |
download | gitea-34795770c337c3bfcc56600a41a9c4bec31d0a8e.tar.gz gitea-34795770c337c3bfcc56600a41a9c4bec31d0a8e.zip |
fix issue stats with milestone filter
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/models/issue.go b/models/issue.go index 9fd53b47f9..80afb415bb 100644 --- a/models/issue.go +++ b/models/issue.go @@ -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) |