From fa03af8456b49ccca9ee2242d908e8fa6363f6c7 Mon Sep 17 00:00:00 2001 From: jaqra <48099350+jaqra@users.noreply.github.com> Date: Fri, 25 Oct 2019 13:09:19 +0300 Subject: [PATCH] make call createMilestoneComment on newIssue func (#8678) (#8681) * 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 e6796db9f..a129bef7d 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