diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -52,9 +52,10 @@ class ChangesetCommentsModel(BaseModel): return user_objects def create(self, text, repo_id, user_id, revision, f_path=None, - line_no=None): + line_no=None, status_change=None): """ - Creates new comment for changeset + Creates new comment for changeset. IF status_change is not none + this comment is associated with a status change of changeset :param text: :param repo_id: @@ -62,6 +63,7 @@ class ChangesetCommentsModel(BaseModel): :param revision: :param f_path: :param line_no: + :param status_change: """ if text: @@ -104,7 +106,8 @@ class ChangesetCommentsModel(BaseModel): NotificationModel().create( created_by=user_id, subject=subj, body=body, - recipients=recipients, type_=Notification.TYPE_CHANGESET_COMMENT + recipients=recipients, type_=Notification.TYPE_CHANGESET_COMMENT, + email_kwargs={'status_change': status_change} ) mention_recipients = set(self._extract_mentions(body))\