diff options
author | jaqra <48099350+jaqra@users.noreply.github.com> | 2019-10-25 10:19:04 +0300 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-25 08:19:04 +0100 |
commit | fc0580a4b743c967be9f12f9efcb8206d4824206 (patch) | |
tree | 1b669e1cca319735187793d79502903c3bb9eac6 /models | |
parent | a520236cb5593d041cee3829c230b8e6791c2b26 (diff) | |
download | gitea-fc0580a4b743c967be9f12f9efcb8206d4824206.tar.gz gitea-fc0580a4b743c967be9f12f9efcb8206d4824206.zip |
make call createMilestoneComment on newIssue func (#8678)
* make call createMilestoneComment on newIssue func
* make OldMilestoneID 0 instead of -1
Diffstat (limited to 'models')
-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 f006917891..52af872ccc 100644 --- a/models/issue.go +++ b/models/issue.go @@ -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 |