Skip to content

Commit 6f3596e

Browse files
lunnywxiaoguangtechknowlogick
authored
Fix bug when project board get open issue number (#17703) (#17726)
Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: techknowlogick <[email protected]>
1 parent 0305a73 commit 6f3596e

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
@@ -115,7 +115,9 @@ func (p *Project) NumClosedIssues() int {
115115
func (p *Project) NumOpenIssues() int {
116116
c, err := x.Table("project_issue").
117117
Join("INNER", "issue", "project_issue.issue_id=issue.id").
118-
Where("project_issue.project_id=? AND issue.is_closed=?", p.ID, false).Count("issue.id")
118+
Where("project_issue.project_id=? AND issue.is_closed=?", p.ID, false).
119+
Cols("issue_id").
120+
Count()
119121
if err != nil {
120122
return 0
121123
}

0 commit comments

Comments
 (0)