Bug 3484 - hgext/bugzilla: status processing is broken
Summary: hgext/bugzilla: status processing is broken
Status: VERIFIED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: earlier
Hardware: PC Windows
: normal bug
Assignee: Jim Hague
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-03 22:36 UTC by Oleg Smolsky
Modified: 2017-11-01 18:05 UTC (History)
4 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Smolsky 2012-06-03 22:36 UTC
The test: use the following commit message:

--------------------------------------------------------------------------------
blah blah, does not matter

 - fixed something blah blah
 - bug 141
--------------------------------------------------------------------------------

Notes:
 - The point here is to reference "fixed" and "bug XXXX".
 - Observe that the referenced bug is marked as "fixed"

The issue:
 - hack hgrc to reset the "fixregex" setting:
   fixregexp = some_data_that_will_never_happen_1234_abcd
 - repeat the test
 - the bug is marked as "resolved"

The fix:
 - see bugzilla.py:  def updatebug()
 - take out the following two lines in the " >= 4" section
#            args['status'] = self.fixstatus
#            args['resolution'] = self.fixresolution
Comment 1 Oleg Smolsky 2012-06-03 22:37 UTC
IE, I wanted to add notes to the bug without marking it as "resolved".
Comment 2 Jim Hague 2012-06-06 11:35 UTC
I think this is a problem with the xmlrpc connection method. It's marking all bugs are 'fixed' regardless of whether they really have that status.

This should fix it.

--- a/hgext/bugzilla.py Tue May 22 15:42:36 2012 +0100
+++ b/hgext/bugzilla.py Wed Jun 06 16:32:09 2012 +0100
@@ -681,8 +681,9 @@
         if self.bzvermajor >= 4:
             args['ids'] = [bugid]
             args['comment'] = {'body' : text}
-            args['status'] = self.fixstatus
-            args['resolution'] = self.fixresolution
+            if 'fix' in newstate:
+                args['status'] = self.fixstatus
+                args['resolution'] = self.fixresolution
             self.bzproxy.Bug.update(args)
         else:
             if 'fix' in newstate:
Comment 3 Matt Mackall 2012-07-29 14:55 UTC
Fixed in 2.2.3 by:

fdc879042414 bugzilla: stop bugs always being marked as fixed in xmlrpc