Skip to content

Commit 9361b65

Browse files
lunnywxiaoguangtechknowlogick
authored
Fix bug when project board get open issue number (#17703)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
1 parent 96ec656 commit 9361b65

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

models/project_issue.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ func (p *Project) NumClosedIssues() int {
121121
func (p *Project) NumOpenIssues() int {
122122
c, err := db.GetEngine(db.DefaultContext).Table("project_issue").
123123
Join("INNER", "issue", "project_issue.issue_id=issue.id").
124-
Where("project_issue.project_id=? AND issue.is_closed=?", p.ID, false).Count("issue.id")
124+
Where("project_issue.project_id=? AND issue.is_closed=?", p.ID, false).
125+
Cols("issue_id").
126+
Count()
125127
if err != nil {
126128
return 0
127129
}

0 commit comments

Comments
 (0)