launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #02985
[Merge] lp:~wgrant/launchpad/bug-280068 into lp:launchpad
William Grant has proposed merging lp:~wgrant/launchpad/bug-280068 into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #280068 in Launchpad itself: "OOPSes when transitioning watched bugtasks' importance"
https://bugs.launchpad.net/launchpad/+bug/280068
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/bug-280068/+merge/53724
ExternalBugTracker.convertRemoteImportance is meant to return a BugTaskImportance, but RequestTracker's implementation returns a string instead. This results in update failures like OOPS-1011CCW2811. This branch fixes it to return BugTaskImportance.UNKNOWN.
--
https://code.launchpad.net/~wgrant/launchpad/bug-280068/+merge/53724
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/bug-280068 into lp:launchpad.
=== modified file 'lib/lp/bugs/doc/externalbugtracker-rt.txt'
--- lib/lp/bugs/doc/externalbugtracker-rt.txt 2010-10-18 22:24:59 +0000
+++ lib/lp/bugs/doc/externalbugtracker-rt.txt 2011-03-17 01:33:32 +0000
@@ -88,6 +88,16 @@
UnknownRemoteStatusError: spam
+== Importance Conversion ==
+
+There is no obvious mapping from ticket priorities to importances. They
+are all imported as Unknown. No exception is raised, because they are
+all unknown.
+
+ >>> rt.convertRemoteImportance('foo').title
+ 'Unknown'
+
+
== Initialisation ==
Calling initializeRemoteBugDB() on our RequestTracker instance and
=== modified file 'lib/lp/bugs/externalbugtracker/rt.py'
--- lib/lp/bugs/externalbugtracker/rt.py 2011-03-11 03:19:07 +0000
+++ lib/lp/bugs/externalbugtracker/rt.py 2011-03-17 01:33:32 +0000
@@ -20,7 +20,10 @@
LookupTree,
UnknownRemoteStatusError,
)
-from lp.bugs.interfaces.bugtask import BugTaskStatus
+from lp.bugs.interfaces.bugtask import (
+ BugTaskImportance,
+ BugTaskStatus,
+ )
from lp.bugs.interfaces.externalbugtracker import UNKNOWN_REMOTE_IMPORTANCE
from lp.services.database.isolation import ensure_no_transaction
from lp.services.propertycache import cachedproperty
@@ -198,11 +201,11 @@
def getRemoteImportance(self, bug_id):
"""See `IExternalBugTracker`."""
- pass
+ return UNKNOWN_REMOTE_IMPORTANCE
def convertRemoteImportance(self, remote_importance):
"""See `IExternalBugTracker`."""
- return UNKNOWN_REMOTE_IMPORTANCE
+ return BugTaskImportance.UNKNOWN
_status_lookup_titles = 'RT status',
_status_lookup = LookupTree(
=== modified file 'lib/lp/services/database/bulk.py'
--- lib/lp/services/database/bulk.py 2011-03-16 10:54:07 +0000
+++ lib/lp/services/database/bulk.py 2011-03-17 01:33:32 +0000
@@ -5,6 +5,7 @@
__metaclass__ = type
__all__ = [
+ 'load',
'reload',
]
=== modified file 'lib/lp/services/features/rulesource.py'
--- lib/lp/services/features/rulesource.py 2011-03-16 06:17:35 +0000
+++ lib/lp/services/features/rulesource.py 2011-03-17 01:33:32 +0000
@@ -4,6 +4,7 @@
"""Returns rules defining which features are active"""
__all__ = [
+ 'DuplicatePriorityError',
'FeatureRuleSource',
'NullFeatureRuleSource',
'StormFeatureRuleSource',