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

* make OldMilestoneID 0 instead of -1

models/issue.go

index f0069178911d0001bde20db293826f5a7afcb4d7..52af872cccf0a2a901237a81ad8f4a843b774407 100644 (file)
@@ -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