launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05122
[Merge] lp:~stevenk/launchpad/drop-mdzcsv into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/drop-mdzcsv into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #124940 in Launchpad itself: "Remove or replace specificationtarget.HasSpecificationsView.mdzCsv"
https://bugs.launchpad.net/launchpad/+bug/124940
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/drop-mdzcsv/+merge/77464
Drop +mdz-specs.csv.
I have checked appserver access logs, and it hasn't been used as far back as they go.
--
https://code.launchpad.net/~stevenk/launchpad/drop-mdzcsv/+merge/77464
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/drop-mdzcsv into lp:launchpad.
=== modified file 'lib/lp/blueprints/browser/configure.zcml'
--- lib/lp/blueprints/browser/configure.zcml 2011-09-19 14:29:47 +0000
+++ lib/lp/blueprints/browser/configure.zcml 2011-09-29 06:40:52 +0000
@@ -65,9 +65,6 @@
facet="specifications"
permission="zope.Public">
<browser:page
- name="+mdz-specs.csv"
- attribute="mdzCsv"/>
- <browser:page
name="+specs"/>
<browser:page
name="+portlet-latestspecs"
@@ -609,12 +606,6 @@
facet="specifications"
permission="launchpad.AnyPerson"
template="../../app/templates/generic-edit.pt"/>
- <browser:page
- for="lp.registry.interfaces.distroseries.IDistroSeries"
- class="lp.blueprints.browser.specificationtarget.HasSpecificationsView"
- permission="zope.Public"
- name="+mdz-specs.csv"
- attribute="mdzCsv"/>
<browser:pages
for="lp.registry.interfaces.projectgroup.IProjectGroup"
=== modified file 'lib/lp/blueprints/browser/specificationtarget.py'
--- lib/lp/blueprints/browser/specificationtarget.py 2011-09-13 05:23:16 +0000
+++ lib/lp/blueprints/browser/specificationtarget.py 2011-09-29 06:40:52 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2011 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""ISpecificationTarget browser views."""
@@ -254,63 +254,6 @@
page_title = 'Blueprints'
- def mdzCsv(self):
- """Quick hack for mdz, to get csv dump of specs."""
- import csv
- from StringIO import StringIO
- output = StringIO()
- writer = csv.writer(output)
- headings = [
- 'name',
- 'title',
- 'url',
- 'specurl',
- 'status',
- 'priority',
- 'assignee',
- 'drafter',
- 'approver',
- 'owner',
- 'distroseries',
- 'direction_approved',
- 'man_days',
- 'delivery',
- ]
-
- def dbschema(item):
- """Format a dbschema sortably for a spreadsheet."""
- return '%s-%s' % (item.value, item.title)
-
- def fperson(person):
- """Format a person as 'name (full name)', or 'none'"""
- if person is None:
- return 'none'
- else:
- return '%s (%s)' % (person.name, person.displayname)
- writer.writerow(headings)
- for spec in self.context.all_specifications:
- row = []
- row.append(spec.name)
- row.append(spec.title)
- row.append(canonical_url(spec))
- row.append(spec.specurl)
- row.append(dbschema(spec.definition_status))
- row.append(dbschema(spec.priority))
- row.append(fperson(spec.assignee))
- row.append(fperson(spec.drafter))
- row.append(fperson(spec.approver))
- row.append(fperson(spec.owner))
- if spec.distroseries is None:
- row.append('none')
- else:
- row.append(spec.distroseries.name)
- row.append(spec.direction_approved)
- row.append(spec.man_days)
- row.append(dbschema(spec.implementation_status))
- writer.writerow([unicode(item).encode('utf8') for item in row])
- self.request.response.setHeader('Content-Type', 'text/plain')
- return output.getvalue()
-
@cachedproperty
def has_any_specifications(self):
return self.context.has_any_specifications