launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #17750
[Merge] lp:~cjwatson/launchpad/structuralsubscription-projectgroup into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/structuralsubscription-projectgroup into lp:launchpad.
Commit message:
Rename StructuralSubscription.project to StructuralSubscription.projectgroup.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #523054 in Launchpad itself: "Rename Product.project to Product.projectgroup"
https://bugs.launchpad.net/launchpad/+bug/523054
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/structuralsubscription-projectgroup/+merge/247956
Rename StructuralSubscription.project to StructuralSubscription.projectgroup.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/structuralsubscription-projectgroup into lp:launchpad.
=== modified file 'lib/lp/bugs/browser/tests/test_structuralsubscription.py'
--- lib/lp/bugs/browser/tests/test_structuralsubscription.py 2012-01-01 02:58:52 +0000
+++ lib/lp/bugs/browser/tests/test_structuralsubscription.py 2015-01-29 10:27:03 +0000
@@ -110,7 +110,7 @@
self.navigation = MilestoneNavigation
-class TestProjectStructuralSubscriptionTraversal(
+class TestProjectGroupStructuralSubscriptionTraversal(
StructuralSubscriptionTraversalTestBase):
"""Test IStructuralSubscription traversal from IProjectGroup."""
=== modified file 'lib/lp/bugs/interfaces/structuralsubscription.py'
--- lib/lp/bugs/interfaces/structuralsubscription.py 2013-01-07 02:40:55 +0000
+++ lib/lp/bugs/interfaces/structuralsubscription.py 2015-01-29 10:27:03 +0000
@@ -55,7 +55,7 @@
product = Int(title=_('Product'), required=False, readonly=True)
productseries = Int(
title=_('Product series'), required=False, readonly=True)
- project = Int(title=_('Project group'), required=False, readonly=True)
+ projectgroup = Int(title=_('Project group'), required=False, readonly=True)
milestone = Int(title=_('Milestone'), required=False, readonly=True)
distribution = Int(title=_('Distribution'), required=False, readonly=True)
distroseries = Int(
=== modified file 'lib/lp/bugs/model/bugtasksearch.py'
--- lib/lp/bugs/model/bugtasksearch.py 2015-01-28 15:35:18 +0000
+++ lib/lp/bugs/model/bugtasksearch.py 2015-01-29 10:27:03 +0000
@@ -531,7 +531,7 @@
BugTaskFlat.product_id,
Select(Product.id, tables=[SS, Product],
where=And(
- SS.projectID == Product.projectID,
+ SS.projectgroupID == Product.projectID,
projectgroup_match,
Product.active))))
extra_clauses.append(Or(*ss_clauses))
=== modified file 'lib/lp/bugs/model/structuralsubscription.py'
--- lib/lp/bugs/model/structuralsubscription.py 2013-06-20 05:50:00 +0000
+++ lib/lp/bugs/model/structuralsubscription.py 2015-01-29 10:27:03 +0000
@@ -105,8 +105,8 @@
productseriesID = Int("productseries", default=None)
productseries = Reference(productseriesID, "ProductSeries.id")
- projectID = Int("project", default=None)
- project = Reference(projectID, "ProjectGroup.id")
+ projectgroupID = Int("project", default=None)
+ projectgroup = Reference(projectgroupID, "ProjectGroup.id")
milestoneID = Int("milestone", default=None)
milestone = Reference(milestoneID, "Milestone.id")
@@ -148,8 +148,8 @@
return self.product
elif self.productseries is not None:
return self.productseries
- elif self.project is not None:
- return self.project
+ elif self.projectgroup is not None:
+ return self.projectgroup
elif self.milestone is not None:
return self.milestone
elif self.distribution is not None:
@@ -214,9 +214,9 @@
def __init__(self, target):
self.target = target
self.target_parent = None
- self.target_arguments = {"project": target}
+ self.target_arguments = {"projectgroup": target}
self.pillar = target
- self.join = (StructuralSubscription.project == target)
+ self.join = (StructuralSubscription.projectgroup == target)
class DistributionSourcePackageTargetHelper:
@@ -274,7 +274,7 @@
if target.project is not None:
self.join = Or(
StructuralSubscription.product == target,
- StructuralSubscription.project == target.project)
+ StructuralSubscription.projectgroup == target.project)
else:
self.join = (
StructuralSubscription.product == target)
=== modified file 'lib/lp/bugs/tests/test_structuralsubscriptiontarget.py'
--- lib/lp/bugs/tests/test_structuralsubscriptiontarget.py 2012-12-26 01:32:19 +0000
+++ lib/lp/bugs/tests/test_structuralsubscriptiontarget.py 2015-01-29 10:27:03 +0000
@@ -332,7 +332,7 @@
self.assertEqual(target, helper.target)
self.assertEqual(None, helper.target_parent)
self.assertEqual(target, helper.pillar)
- self.assertEqual({"project": target}, helper.target_arguments)
+ self.assertEqual({"projectgroup": target}, helper.target_arguments)
self.assertEqual(
u"StructuralSubscription.project = ?",
compile_storm(helper.join))
Follow ups