diff options
author | jaqra <48099350+jaqra@users.noreply.github.com> | 2019-10-25 13:10:28 +0300 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-10-25 11:10:28 +0100 |
commit | 76bbcf13870a46b15d7fb04a311e8584d76c3a15 (patch) | |
tree | c33421b0a90ed55937a0e34491afb22cf7b97db6 | |
parent | 1bcbc0204530fd3f7b0930ed13306d794733843c (diff) | |
download | gitea-76bbcf13870a46b15d7fb04a311e8584d76c3a15.tar.gz gitea-76bbcf13870a46b15d7fb04a311e8584d76c3a15.zip |
make call createMilestoneComment on newIssue func (#8678) (#8682)
* 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 ea2e8d0d92..e7fda77e31 100644 --- a/models/issue.go +++ b/models/issue.go @@ -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 |