diff options
author | jaqra <48099350+jaqra@users.noreply.github.com> | 2019-10-25 13:09:19 +0300 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-25 11:09:19 +0100 |
commit | fa03af8456b49ccca9ee2242d908e8fa6363f6c7 (patch) | |
tree | 6305222f99cdc3681158b5195ff00b143e8c1197 | |
parent | 14ebda6fd500cf57b8a48518782c7d8dcb7d19d7 (diff) | |
download | gitea-fa03af8456b49ccca9ee2242d908e8fa6363f6c7.tar.gz gitea-fa03af8456b49ccca9ee2242d908e8fa6363f6c7.zip |
make call createMilestoneComment on newIssue func (#8678) (#8681)
* make call createMilestoneComment on newIssue func
* make OldMilestoneID 0 instead of -1
-rw-r--r-- | models/issue.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go index e6796db9fc..a129bef7db 100644 --- a/models/issue.go +++ b/models/issue.go @@ -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 |