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

* make OldMilestoneID 0 instead of -1

models/issue.go

index e6796db9fcae196b32748f896efcd0c4e07f94a5..a129bef7db6b300408733eb2d1bcd68f3bab29b1 100644 (file)
@@ -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