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

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

Hi, as you suggested, I moved „active” from ISeries to IDistroSeries.

Here is the latest diff:
=== modified file 'lib/lp/registry/interfaces/distroseries.py'
--- lib/lp/registry/interfaces/distroseries.py 2010-03-06 01:24:05 +0000
+++ lib/lp/registry/interfaces/distroseries.py 2010-03-08 09:08:46 +0000
@@ -164,6 +164,12 @@
             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-06 01:24:05 +0000
+++ lib/lp/registry/interfaces/series.py 2010-03-08 09:07:19 +0000
@@ -92,13 +92,6 @@
 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 '

=== modified file 'lib/lp/registry/model/distroseries.py'
--- lib/lp/registry/model/distroseries.py 2010-03-05 15:50:47 +0000
+++ lib/lp/registry/model/distroseries.py 2010-03-08 09:09:20 +0000
@@ -183,6 +183,15 @@
         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-05 13:14:49 +0000
+++ lib/lp/registry/model/series.py 2010-03-08 09:08:56 +0000
@@ -25,15 +25,6 @@
     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-05 13:14:49 +0000
+++ lib/lp/registry/stories/webservice/xx-project-registry.txt 2010-03-08 09:11:47 +0000
@@ -810,7 +810,6 @@

     >>> 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