From 76bbcf13870a46b15d7fb04a311e8584d76c3a15 Mon Sep 17 00:00:00 2001 From: jaqra <48099350+jaqra@users.noreply.github.com> Date: Fri, 25 Oct 2019 13:10:28 +0300 Subject: [PATCH] make call createMilestoneComment on newIssue func (#8678) (#8682) * 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 ea2e8d0d92..e7fda77e31 100644 --- a/models/issue.go +++ b/models/issue.go @@ -1102,6 +1102,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