aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-10-23 12:54:19 -0400
committerUnknwon <u@gogs.io>2015-10-23 12:54:19 -0400
commite0aab4a7f6c1f1b5cc7fa40e2c09623b635bc4a6 (patch)
tree7ce9698b096ec80a7e2c050bb1298671bd333a41 /routers
parentdb7ac8bc1d4cfb2890a11784d49814c230a7b3e6 (diff)
downloadgitea-e0aab4a7f6c1f1b5cc7fa40e2c09623b635bc4a6.tar.gz
gitea-e0aab4a7f6c1f1b5cc7fa40e2c09623b635bc4a6.zip
#1830 new comment with status change overwrites issue content
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/issue.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go
index e49b572c26..166b369dca 100644
--- a/routers/repo/issue.go
+++ b/routers/repo/issue.go
@@ -786,7 +786,7 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
if err = issue.ChangeStatus(ctx.User, form.Status == "close"); err != nil {
log.Error(4, "ChangeStatus: %v", err)
} else {
- log.Trace("Issue[%d] status changed: %v", issue.ID, !issue.IsClosed)
+ log.Trace("Issue[%d] status changed to closed: %v", issue.ID, issue.IsClosed)
}
}
}
@@ -829,8 +829,11 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
// Mail watchers and mentions.
if setting.Service.EnableNotifyMail {
- issue.Content = form.Content
- tos, err := mailer.SendIssueNotifyMail(ctx.User, ctx.Repo.Owner, ctx.Repo.Repository, issue)
+ tos, err := mailer.SendIssueNotifyMail(ctx.User, ctx.Repo.Owner, ctx.Repo.Repository, &models.Issue{
+ Index: issue.Index,
+ Name: issue.Name,
+ Content: form.Content,
+ })
if err != nil {
ctx.Handle(500, "SendIssueNotifyMail", err)
return