From 6bb9c442b2d95bf683702c089085bb50b987818f Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 2 Jun 2017 17:30:15 -0400 Subject: issue: fix updated_unix is not updated for new comments (#4462) --- models/comment.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'models') diff --git a/models/comment.go b/models/comment.go index 673ca780..be29e2ba 100644 --- a/models/comment.go +++ b/models/comment.go @@ -275,7 +275,10 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err if err != nil { return nil, err } + } + if _, err = e.Exec("UPDATE `issue` SET updated_unix = ? WHERE id = ?", time.Now().Unix(), opts.Issue.ID); err != nil { + return nil, fmt.Errorf("update issue 'updated_unix': %v", err) } // Notify watchers for whatever action comes in, ignore if no action type. -- cgit v1.2.3