finish close/reopen issue

This commit is contained in:
Unknwon 2015-08-13 23:21:43 +08:00
parent 0ec7d1539b
commit 1fb53067f4
12 changed files with 115 additions and 27 deletions

View file

@ -720,9 +720,9 @@ func NewComment(ctx *middleware.Context, form auth.CreateCommentForm) {
// Check if issue owner/poster changes the status of issue.
if (ctx.Repo.IsOwner() || issue.IsPoster(ctx.User.Id)) &&
(form.NewStatus == "reopen" || form.NewStatus == "close") {
(form.Status == "reopen" || form.Status == "close") {
issue.Repo = ctx.Repo.Repository
if err = issue.ChangeStatus(ctx.User, form.NewStatus == "close"); err != nil {
if err = issue.ChangeStatus(ctx.User, form.Status == "close"); err != nil {
ctx.Handle(500, "ChangeStatus", err)
return
}