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
1=== modified file 'lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt'
2--- lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt 2009-05-11 18:19:21 +0000
3+++ lib/lp/blueprints/stories/sprints/xx-sprint-meeting-export.txt 2012-05-16 11:30:26 +0000
4@@ -38,3 +38,12 @@
5 ... print "%(displayname)s, %(name)s, %(start)s -> %(end)s" % person
6 Celso Providelo, cprov, 2005-10-07T23:30:00Z -> 2005-11-17T00:11:00Z
7 Foo Bar, name16, 2005-10-07T23:30:00Z -> 2005-11-17T00:11:00Z
8+
9+The <unscheduled /> element contains a list of meetings. Each of these
10+actually refers to a Specification.
11+
12+ >>> soup = BSS(browser.contents)
13+ >>> meetings = soup.find('unscheduled').findAll('meeting')
14+ >>> for meeting in meetings:
15+ ... print "%(id)s: %(name)s, %(lpurl)s" % meeting
16+ 1: extension-manager-upgrades, .../+spec/extension-manager-upgrades
17
18=== modified file 'lib/lp/blueprints/templates/sprint-meeting-export.pt'
19--- lib/lp/blueprints/templates/sprint-meeting-export.pt 2009-07-17 17:59:07 +0000
20+++ lib/lp/blueprints/templates/sprint-meeting-export.pt 2012-05-16 11:30:26 +0000
21@@ -15,7 +15,8 @@
22
23 <unscheduled>
24 <meeting tal:repeat="spec view/specifications"
25- tal:attributes="name spec/spec/name;
26+ tal:attributes="id spec/spec/id;
27+ name spec/spec/name;
28 status spec/spec/definition_status/name;
29 lpurl spec/spec/fmt:url;
30 specurl spec/spec/specurl;
31
32=== modified file 'lib/lp/bugs/model/tests/test_bug.py'
33--- lib/lp/bugs/model/tests/test_bug.py 2012-05-03 01:14:29 +0000
34+++ lib/lp/bugs/model/tests/test_bug.py 2012-05-16 11:30:26 +0000
35@@ -8,7 +8,6 @@
36 timedelta,
37 )
38
39-from lazr.lifecycle.interfaces import IObjectModifiedEvent
40 from pytz import UTC
41 from storm.expr import Join
42 from storm.store import Store
43@@ -23,7 +22,6 @@
44 BugNotificationStatus,
45 )
46 from lp.bugs.errors import BugCannotBePrivate
47-from lp.bugs.interfaces.bug import IBug
48 from lp.bugs.interfaces.bugnotification import IBugNotificationSet
49 from lp.bugs.interfaces.bugtask import BugTaskStatus
50 from lp.bugs.mail.bugnotificationrecipients import BugNotificationRecipients
51@@ -43,7 +41,6 @@
52 StormStatementRecorder,
53 TestCaseWithFactory,
54 )
55-from lp.testing.event import TestEventListener
56 from lp.testing.layers import DatabaseFunctionalLayer
57 from lp.testing.matchers import (
58 Equals,