← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad:export-official-flags into launchpad:master

 

Colin Watson has proposed merging ~cjwatson/launchpad:export-official-flags into launchpad:master.

Commit message:
Export ILaunchpadUsage official_* flags

For example, this is useful for reconfiguring things like bug tracking
on a large number of projects.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/374533
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:export-official-flags into launchpad:master.
diff --git a/lib/lp/app/interfaces/launchpad.py b/lib/lp/app/interfaces/launchpad.py
index 160da2e..96a2f95 100644
--- a/lib/lp/app/interfaces/launchpad.py
+++ b/lib/lp/app/interfaces/launchpad.py
@@ -115,18 +115,22 @@ class IServiceUsage(Interface):
 
 class ILaunchpadUsage(Interface):
     """How the project uses Launchpad."""
-    official_answers = Bool(
-        title=_('People can ask questions in Launchpad Answers'),
-        required=True)
-    official_blueprints = Bool(
-        title=_('This project uses blueprints'), required=True)
-    official_codehosting = Bool(
-        title=_('Code for this project is published in Bazaar branches on'
-                ' Launchpad'),
-        required=True)
-    official_malone = Bool(
-        title=_('Bugs in this project are tracked in Launchpad'),
-        required=True)
+    official_answers = exported(
+        Bool(
+            title=_('People can ask questions in Launchpad Answers'),
+            required=True))
+    official_blueprints = exported(
+        Bool(title=_('This project uses blueprints'), required=True))
+    official_codehosting = exported(
+        Bool(
+            title=_('Code for this project is published in Bazaar branches on'
+                    ' Launchpad'),
+            required=True))
+    official_malone = exported(
+        Bool(
+            title=_('Bugs in this project are tracked in Launchpad'),
+            required=True),
+        exported_as='official_bugs')
     official_anything = Bool(
         title=_('Uses Launchpad for something'))
     enable_bug_expiration = Bool(
diff --git a/lib/lp/registry/stories/webservice/xx-distribution.txt b/lib/lp/registry/stories/webservice/xx-distribution.txt
index f8a4d58..1c0ed87 100644
--- a/lib/lp/registry/stories/webservice/xx-distribution.txt
+++ b/lib/lp/registry/stories/webservice/xx-distribution.txt
@@ -44,7 +44,11 @@ And for every distribution we publish most of its attributes.
     mirror_admin_link: u'http://.../~ubuntu-mirror-admins'
     mugshot_link: u'http://.../ubuntu/mugshot'
     name: u'ubuntu'
+    official_answers: True
+    official_blueprints: True
     official_bug_tags: []
+    official_bugs: True
+    official_codehosting: False
     official_packages: True
     owner_link: u'http://.../~ubuntu-team'
     redirect_release_uploads: False
diff --git a/lib/lp/registry/stories/webservice/xx-project-registry.txt b/lib/lp/registry/stories/webservice/xx-project-registry.txt
index 59ce22b..86f87ec 100644
--- a/lib/lp/registry/stories/webservice/xx-project-registry.txt
+++ b/lib/lp/registry/stories/webservice/xx-project-registry.txt
@@ -177,7 +177,11 @@ Projects are available at their canonical URL on the API virtual host.
     licenses: [u'MIT / X / Expat Licence']
     logo_link: u'http://.../firefox/logo'
     name: u'firefox'
+    official_answers: True
+    official_blueprints: False
     official_bug_tags: []
+    official_bugs: True
+    official_codehosting: False
     owner_link: u'http://.../~name12'
     private: False
     private_bugs: False