From fc0580a4b743c967be9f12f9efcb8206d4824206 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 f00691789..52af872cc 100644 --- a/models/issue.go +++ b/models/issue.go @@ -970,6 +970,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