]> source.dussan.org Git - gitea.git/commitdiff
make call createMilestoneComment on newIssue func (#8678) (#8682)
authorjaqra <48099350+jaqra@users.noreply.github.com>
Fri, 25 Oct 2019 10:10:28 +0000 (13:10 +0300)
committerzeripath <art27@cantab.net>
Fri, 25 Oct 2019 10:10:28 +0000 (11:10 +0100)
* make call createMilestoneComment on newIssue func

* make OldMilestoneID 0 instead of -1

models/issue.go

index ea2e8d0d92ac948e9f002266c1d273a6ba44d7f9..e7fda77e316cc725398761c7a9908cb504ac00ca 100644 (file)
@@ -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