1. Olemis Lang
  2. bloodhound-mq

Commits

Olemis Lang  committed d48b823

BH Multiproduct #671 : Set the author in comments for product edits

  • Participants
  • Parent commits 7a5595f
  • Branches t671_product_edit_author

Comments (0)

Files changed (2)

File series

View file
 t669/t669_r1525378_product_edit.diff
 t669/t669_r1525378_product_edit.tests.diff
 t387/t387_r1524640_no_r5994.diff
+t671/t671_r1526159_product_edit_author.diff

File t671/t671_r1526159_product_edit_author.diff

View file
+# HG changeset patch
+# Parent b46ac94f229c540312dfaa0af1021e488d2829bc
+BH Multiproduct #671 : Product edits author
+
+diff -r b46ac94f229c bloodhound_multiproduct/multiproduct/web_ui.py
+--- a/bloodhound_multiproduct/multiproduct/web_ui.py	Wed Sep 25 13:35:32 2013 -0500
++++ b/bloodhound_multiproduct/multiproduct/web_ui.py	Wed Sep 25 19:21:53 2013 -0500
+@@ -21,6 +21,7 @@
+ Provides request filtering to capture product related paths
+ """
+ 
++from functools import partial
+ import re
+ 
+ from trac.core import Component, TracError, implements
+@@ -172,7 +173,10 @@
+             else:
+                 req.perm.require('PRODUCT_MODIFY')
+                 product.update_field_dict(field_data)
++                product._update_relations = partial(product._update_relations,
++                                                    author=req.authname)
+                 product.update()
++                del product._update_relations
+                 add_notice(req, _('Your changes have been saved.'))
+         else:
+             req.perm.require('PRODUCT_CREATE')