From 1880ef4b1b1bd7d6590c05ddd4b5476559b2af62 Mon Sep 17 00:00:00 2001 From: jaqra <48099350+jaqra@users.noreply.github.com> Date: Fri, 25 Oct 2019 10:19:04 +0300 Subject: [PATCH] make call createMilestoneComment on newIssue func (#8678) * make call createMilestoneComment on newIssue func * make OldMilestoneID 0 instead of -1 --- models/issue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/issue.go b/models/issue.go index e6796db9fcae1..a129bef7db6b3 100644 --- a/models/issue.go +++ b/models/issue.go @@ -1072,6 +1072,10 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) { if _, err = e.Exec("UPDATE `milestone` SET num_issues=num_issues+1 WHERE id=?", opts.Issue.MilestoneID); err != nil { return err } + + if _, err = createMilestoneComment(e, doer, opts.Repo, opts.Issue, 0, opts.Issue.MilestoneID); err != nil { + return err + } } // Insert the assignees