Code review comment for lp:~adiroiban/launchpad/bug-531261

Revision history for this message
Adi Roiban (adiroiban) wrote :

Here is the diff for moving "active" back to SeriesMixin.

I have pushed these changes.

After pulling the changes, can you please try to run this test on you computer:
bin/test --layer=WindmillLayer -t programming_languages_edit -t title_inline_edit -t product_edit_people_driver -t product_edit_people_owner -t project_licenses -t test_timeline_graph

Many thanks!
=== modified file 'lib/lp/registry/interfaces/distroseries.py'
--- lib/lp/registry/interfaces/distroseries.py 2010-03-09 12:37:25 +0000
+++ lib/lp/registry/interfaces/distroseries.py 2010-03-12 17:49:47 +0000
@@ -165,12 +165,6 @@
             description=_(
                 "The title of this series. It should be distinctive "
                 "and designed to look good at the top of a page.")))
- active = exported(Bool(
- title=_("Active"),
- description=_(
- "Whether or not this series is stable and supported, or "
- "under current development. This excludes series which "
- "are experimental or obsolete.")))
     description = exported(
         Description(title=_("Description"), required=True,
             description=_("A detailed description of this series, with "

=== modified file 'lib/lp/registry/interfaces/series.py'
--- lib/lp/registry/interfaces/series.py 2010-03-08 09:34:22 +0000
+++ lib/lp/registry/interfaces/series.py 2010-03-12 17:50:01 +0000
@@ -92,6 +92,13 @@
 class ISeriesMixin(IHasDrivers):
     """Methods & properties shared between distro & product series."""

+ active = exported(Bool(
+ title=_("Active"),
+ description=_(
+ "Whether or not this series is stable and supported, or "
+ "under current development. This excludes series which "
+ "are experimental or obsolete.")))
+
     summary = exported(
         Summary(title=_("Summary"),
              description=_('A single paragraph that explains the goals of '
@@ -110,7 +117,6 @@
             readonly=True,
             value_type=Reference(schema=IPerson)))

-
     bug_supervisor = CollectionField(
         title=_('Currently just a reference to the parent bug '
                 'supervisor.'),

=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py 2010-03-09 12:37:25 +0000
+++ lib/lp/registry/model/distroseries.py 2010-03-12 17:50:16 +0000
@@ -182,15 +182,6 @@
         intermediateTable='SectionSelection')

     @property
- def active(self):
- return self.status in [
- SeriesStatus.DEVELOPMENT,
- SeriesStatus.FROZEN,
- SeriesStatus.CURRENT,
- SeriesStatus.SUPPORTED,
- ]
-
- @property
     def named_version(self):
         return '%s (%s)' % (self.displayname, self.version)

=== modified file 'lib/lp/registry/model/series.py'
--- lib/lp/registry/model/series.py 2010-03-08 09:34:22 +0000
+++ lib/lp/registry/model/series.py 2010-03-12 17:50:23 +0000
@@ -25,6 +25,15 @@
     summary = StringCol(notNull=True)

     @property
+ def active(self):
+ return self.status in [
+ SeriesStatus.DEVELOPMENT,
+ SeriesStatus.FROZEN,
+ SeriesStatus.CURRENT,
+ SeriesStatus.SUPPORTED,
+ ]
+
+ @property
     def bug_supervisor(self):
         """See `ISeriesMixin`."""
         return self.parent.bug_supervisor

=== modified file 'lib/lp/registry/stories/webservice/xx-project-registry.txt'
--- lib/lp/registry/stories/webservice/xx-project-registry.txt 2010-03-08 12:23:03 +0000
+++ lib/lp/registry/stories/webservice/xx-project-registry.txt 2010-03-12 17:56:15 +0000
@@ -817,6 +817,7 @@

     >>> babadoo_foobadoo = webservice.get('/babadoo/foobadoo').jsonBody()
     >>> pprint_entry(babadoo_foobadoo)
+ active: True
     active_milestones_collection_link: u'http://.../babadoo/foobadoo/active_milestones'
     all_milestones_collection_link: u'http://.../babadoo/foobadoo/all_milestones'
     branch_link: u'http://.../~babadoo-owner/babadoo/fooey'

« Back to merge proposal