make call createMilestoneComment on newIssue func (#8678) (#8681)

* make call createMilestoneComment on newIssue func

* make OldMilestoneID 0 instead of -1
pull/8663/head^2
jaqra 5 years ago committed by zeripath
parent 14ebda6fd5
commit fa03af8456
  1. 4
      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

Loading…
Cancel
Save