Browse Source

make call createMilestoneComment on newIssue func (#8678)

* make call createMilestoneComment on newIssue func

* make OldMilestoneID 0 instead of -1
tags/v1.11.0-rc1
jaqra 4 years ago
parent
commit
fc0580a4b7
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      models/issue.go

+ 4
- 0
models/issue.go View 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

Loading…
Cancel
Save