← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/distribution-enum-selection-677536 into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/distribution-enum-selection-677536 into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #677536 Distributions should be able to set usage enums for answers and blueprints
  https://bugs.launchpad.net/bugs/677536


Summary
=======
Although internally distributions now use the usage enums phased in for bridging the gap, they don't expose those settings where appropriate.

This branch exposes them for answers and blueprints. Bugs and translations both require more in depth solutions, making them more appropriately separate bugs.

Proposed fix
============
Switch use of official_* booleans for *_usage enums in the field names for distribution. All other work was already done.

Preimplementation talk
======================
Spoke with Curtis Hovey and Robert Collins (via comments on bug) regarding scope.

Implementation details
======================
As in Proposed.

Tests
=====
bin/test -t distribution-views

Demo & QA
=========
Go to launchpad.dev/ubuntu/+edit; you should now have an enum selection for blue prints and answers.

Lint
====
make lint output:

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/browser/distribution.py
  lib/lp/registry/browser/tests/distribution-views.txt

-- 
https://code.launchpad.net/~jcsackett/launchpad/distribution-enum-selection-677536/+merge/42161
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/distribution-enum-selection-677536 into lp:launchpad.
=== modified file 'lib/lp/registry/browser/distribution.py'
--- lib/lp/registry/browser/distribution.py	2010-11-23 23:22:27 +0000
+++ lib/lp/registry/browser/distribution.py	2010-11-29 19:45:18 +0000
@@ -741,9 +741,9 @@
         "domainname",
         "members",
         "official_malone",
-        "official_blueprints",
+        "blueprints_usage",
         "official_rosetta",
-        "official_answers",
+        "answers_usage",
         ]
 
     @property
@@ -787,9 +787,9 @@
         'mugshot',
         'official_malone',
         'enable_bug_expiration',
-        'official_blueprints',
+        'blueprints_usage',
         'official_rosetta',
-        'official_answers',
+        'answers_usage',
         'translation_focus',
         ]
 

=== modified file 'lib/lp/registry/browser/tests/distribution-views.txt'
--- lib/lp/registry/browser/tests/distribution-views.txt	2010-11-03 14:40:53 +0000
+++ lib/lp/registry/browser/tests/distribution-views.txt	2010-11-29 19:45:18 +0000
@@ -51,8 +51,8 @@
 
     >>> view.field_names
     ['name', 'displayname', 'title', 'summary', 'description', 'domainname',
-     'members', 'official_malone', 'official_blueprints', 'official_rosetta',
-     'official_answers']
+     'members', 'official_malone', 'blueprints_usage', 'official_rosetta',
+     'answers_usage']
 
     >>> login("admin@xxxxxxxxxxxxx")
     >>> form = {
@@ -113,7 +113,7 @@
     ['displayname', 'title', 'summary', 'description',
      'bug_reporting_guidelines', 'bug_reported_acknowledgement', 'icon',
      'logo', 'mugshot', 'official_malone', 'enable_bug_expiration',
-     'official_blueprints', 'official_rosetta', 'official_answers',
+     'blueprints_usage', 'official_rosetta', 'answers_usage',
      'translation_focus']
 
     >>> del form['field.name']