Merge lp:~gmb/launchpad/bug-999554 into lp:launchpad

Proposed by Graham Binns
Status: Merged
Approved by: Graham Binns
Approved revision: no longer in the source branch.
Merged at revision: 15261
Proposed branch: lp:~gmb/launchpad/bug-999554
Merge into: lp:launchpad
Diff against target: 58 lines (+11/-4)
3 files modified
lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt (+9/-0)
lib/lp/blueprints/templates/sprint-meeting-export.pt (+2/-1)
lib/lp/bugs/model/tests/test_bug.py (+0/-3)
To merge this branch: bzr merge lp:~gmb/launchpad/bug-999554
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Francesco Banconi (community) code* Approve
Review via email: mp+105944@code.launchpad.net

Description of the change

This branch fixes bug 999554 by adding an ID field to the Specification export in $sprint/+temp-meeting-export.

I've added a test to cover the change (that view is not very well tested) and removed some unused imports to offset the LoC change a bit.

To post a comment you must log in.
Revision history for this message
Francesco Banconi (frankban) wrote :

Graham, your branch looks good, thank you.
I've just spotted a problem: at line 8 of the diff you removed an interface previously exposed through the webservice.
This generate an error during AppServerLayer set up, e.g. running::

    bin/test -t lp.bugs.model.tests.test_bugtask.TestWebservice

Approved with that fix. Waiting for rvba approval.

review: Approve (code*)
Revision history for this message
Raphaël Badin (rvb) wrote :

Looks good to me. I would have preferred a proper unit test instead of a doc test but I guess it would be too much of a hassle.

review: Approve
Revision history for this message
Graham Binns (gmb) wrote :

On 16 May 2012 16:17, Raphaël Badin <email address hidden> wrote:
> Looks good to me.  I would have preferred a proper unit test instead of a doc test but I guess it would be too much of a hassle.

Right. Given the context and the timing I stuck with appending
something rather than re-writing what was there (which probably would
have been pretty cheap, but I was being lazy). As it happens, this
View should go away at some point anyway, with the help of external
contributors.

Revision history for this message
Robert Collins (lifeless) wrote :

On the LOC side, please still find enough to offset the new code
(which includes tests), unless you've got some recent credit up your
sleeve.

Thanks
Rob

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt'
--- lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt 2009-05-11 18:19:21 +0000
+++ lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt 2012-05-16 11:30:26 +0000
@@ -38,3 +38,12 @@
38 ... print "%(displayname)s, %(name)s, %(start)s -> %(end)s" % person38 ... print "%(displayname)s, %(name)s, %(start)s -> %(end)s" % person
39 Celso Providelo, cprov, 2005-10-07T23:30:00Z -> 2005-11-17T00:11:00Z39 Celso Providelo, cprov, 2005-10-07T23:30:00Z -> 2005-11-17T00:11:00Z
40 Foo Bar, name16, 2005-10-07T23:30:00Z -> 2005-11-17T00:11:00Z40 Foo Bar, name16, 2005-10-07T23:30:00Z -> 2005-11-17T00:11:00Z
41
42The <unscheduled /> element contains a list of meetings. Each of these
43actually refers to a Specification.
44
45 >>> soup = BSS(browser.contents)
46 >>> meetings = soup.find('unscheduled').findAll('meeting')
47 >>> for meeting in meetings:
48 ... print "%(id)s: %(name)s, %(lpurl)s" % meeting
49 1: extension-manager-upgrades, .../+spec/extension-manager-upgrades
4150
=== modified file 'lib/lp/blueprints/templates/sprint-meeting-export.pt'
--- lib/lp/blueprints/templates/sprint-meeting-export.pt 2009-07-17 17:59:07 +0000
+++ lib/lp/blueprints/templates/sprint-meeting-export.pt 2012-05-16 11:30:26 +0000
@@ -15,7 +15,8 @@
1515
16 <unscheduled>16 <unscheduled>
17 <meeting tal:repeat="spec view/specifications"17 <meeting tal:repeat="spec view/specifications"
18 tal:attributes="name spec/spec/name;18 tal:attributes="id spec/spec/id;
19 name spec/spec/name;
19 status spec/spec/definition_status/name;20 status spec/spec/definition_status/name;
20 lpurl spec/spec/fmt:url;21 lpurl spec/spec/fmt:url;
21 specurl spec/spec/specurl;22 specurl spec/spec/specurl;
2223
=== modified file 'lib/lp/bugs/model/tests/test_bug.py'
--- lib/lp/bugs/model/tests/test_bug.py 2012-05-03 01:14:29 +0000
+++ lib/lp/bugs/model/tests/test_bug.py 2012-05-16 11:30:26 +0000
@@ -8,7 +8,6 @@
8 timedelta,8 timedelta,
9 )9 )
1010
11from lazr.lifecycle.interfaces import IObjectModifiedEvent
12from pytz import UTC11from pytz import UTC
13from storm.expr import Join12from storm.expr import Join
14from storm.store import Store13from storm.store import Store
@@ -23,7 +22,6 @@
23 BugNotificationStatus,22 BugNotificationStatus,
24 )23 )
25from lp.bugs.errors import BugCannotBePrivate24from lp.bugs.errors import BugCannotBePrivate
26from lp.bugs.interfaces.bug import IBug
27from lp.bugs.interfaces.bugnotification import IBugNotificationSet25from lp.bugs.interfaces.bugnotification import IBugNotificationSet
28from lp.bugs.interfaces.bugtask import BugTaskStatus26from lp.bugs.interfaces.bugtask import BugTaskStatus
29from lp.bugs.mail.bugnotificationrecipients import BugNotificationRecipients27from lp.bugs.mail.bugnotificationrecipients import BugNotificationRecipients
@@ -43,7 +41,6 @@
43 StormStatementRecorder,41 StormStatementRecorder,
44 TestCaseWithFactory,42 TestCaseWithFactory,
45 )43 )
46from lp.testing.event import TestEventListener
47from lp.testing.layers import DatabaseFunctionalLayer44from lp.testing.layers import DatabaseFunctionalLayer
48from lp.testing.matchers import (45from lp.testing.matchers import (
49 Equals,46 Equals,