diff rhodecode/controllers/pullrequests.py @ 2796:bf3c976d02ec beta

always post text about status changes of code-review
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 04 Sep 2012 00:34:39 +0200
parents 52617fb79010
children 0b2214604c74
line wrap: on
line diff
--- a/rhodecode/controllers/pullrequests.py	Tue Sep 04 00:27:31 2012 +0200
+++ b/rhodecode/controllers/pullrequests.py	Tue Sep 04 00:34:39 2012 +0200
@@ -339,9 +339,12 @@
 
         status = request.POST.get('changeset_status')
         change_status = request.POST.get('change_changeset_status')
-
+        text = request.POST.get('text')
+        if status and change_status:
+            text = text or (_('Status change -> %s')
+                            % ChangesetStatus.get_status_lbl(status))
         comm = ChangesetCommentsModel().create(
-            text=request.POST.get('text'),
+            text=text,
             repo=c.rhodecode_db_repo.repo_id,
             user=c.rhodecode_user.user_id,
             pull_request=pull_request_id,