You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <de...@bloodhound.apache.org> on 2014/01/09 09:16:14 UTC

Re: [Apache Bloodhound] #671: Product edits always reported as anonymous

#671: Product edits always reported as anonymous
---------------------------+---------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  review
  Priority:  minor         |  Milestone:  Release 8
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  product, crud
---------------------------+---------------------------
Changes (by rjollos):

 * owner:  rjollos => olemis


Comment:

 Good catch! I believe the proper fix here is to add an `author` parameter
 to the `update` method. This was done for the
 [t:browser:/branches/1.0-stable/trac/ticket/model.py?rev=12265&marks=1049#L1048
 Milestone] class in trac:#4582 for Trac 1.0.2, and will be done for the
 other `ticket` module classes in trac:#11367.

 We have 3 cases to handle:
  * Rename from the product view
  * Rename from the admin product view
  * Rename from the command line

 For the `Milestone` class, all 3 cases were fixed in [trac 12194].

 ----

 (In [1556758])

 0.8dev: Use the authenticated user as the author of the change when
 renaming a product.

 Initial patch and functional test case from Olemis.

 ----

 The functional test case `TestProductRenameAuthor` in `product.py` is
 currently commented because it is failing with:
 {{{#!pycon
 ======================================================================
 FAIL: runTest (tests.functional.product.TestProductRenameAuthor)
 Check for correct author in ticket comments on product rename
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File
 "/home/user/Workspace/bhdev/bloodhound.git/bloodhound_multiproduct/tests/functional/product.py",
 line 58, in runTest
     t1 = tester.create_ticket()
   File "./tests/functional/__init__.py", line 543, in create_ticket
     self._post_create_ticket()
   File "./tests/functional/__init__.py", line 504, in _post_create_ticket
     tc.url(self.url + '/ticket/%s' % (self.ticketcount + 1))
   File
 "/home/user/Workspace/bhdev/bloodhound.git/trac/trac/tests/functional/better_twill.py",
 line 221, in better_url
     raise twill.errors.TwillAssertionError(*args)
 TwillAssertionError: ("current url is
 'http://127.0.0.1:8105/products/avoidable/ticket/1';\ndoes not match
 'http://127.0.0.1:8105/products/avoidable/ticket/51'\n",
 '/home/user/Workspace/bhdev/bloodhound.git/trac/testenv/trac/log/TestProductRenameAuthor.html')

 ----------------------------------------------------------------------
 Ran 130 tests in 348.126s

 FAILED (failures=2, skipped=2)
 }}}

 Olemis, would you mind taking a look at that issue? It seems that either
 the context is not being switched as expected, or the `ticketcount` is not
 being tracked correctly.

 Also, we should add test cases for product rename from the admin page, and
 product rename from the console.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/671#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker