Merge lp:~mabac/launchpad-work-items-tracker/linaro-roadmap-add-priority into lp:~linaro-automation/launchpad-work-items-tracker/linaro

Proposed by Mattias Backman
Status: Merged
Approved by: James Westby
Approved revision: 302
Merged at revision: 302
Proposed branch: lp:~mabac/launchpad-work-items-tracker/linaro-roadmap-add-priority
Merge into: lp:~linaro-automation/launchpad-work-items-tracker/linaro
Diff against target: 167 lines (+52/-19)
6 files modified
collect_roadmap (+14/-4)
html-report (+2/-6)
lpworkitems/database.py (+18/-1)
lpworkitems/models_roadmap.py (+7/-0)
templates/roadmap_card.html (+9/-6)
templates/roadmap_lane.html (+2/-2)
To merge this branch: bzr merge lp:~mabac/launchpad-work-items-tracker/linaro-roadmap-add-priority
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+79837@code.launchpad.net

Description of the change

Hi,

This branch adds roadmap card priority, size and some other information to the card view.

Thanks,

Mattias

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'collect_roadmap'
2--- collect_roadmap 2011-10-12 13:19:59 +0000
3+++ collect_roadmap 2011-10-19 15:16:57 +0000
4@@ -94,19 +94,29 @@
5 break
6 if task_status is not None:
7 card_type_id = task['task']['card_type_id']
8+ card_type_name = None
9 for card_type in card_types:
10- if (card_type['id'] == card_type_id and
11- card_type['name'] in types_to_ignore):
12- dbg("Ignoring card '%s' since it\'s type is '%s'." % \
13- (task['task']['name'], card_type['name']))
14+ if card_type['id'] == card_type_id:
15+ card_type_name = card_type['name']
16 break
17 else:
18+ dbg("Cannot find type for card '%s'." % (task['task']['name']))
19+ if card_type_name in types_to_ignore:
20+ dbg("Ignoring card '%s' since it\'s type is '%s'." % \
21+ (task['task']['name'], card_type['name']))
22+ else:
23 lane_id = task_status['parent_id']
24 assert lane_id is not None
25 model_card = Card(unicode_or_None(task['task']['name']),
26 task['task']['id'], lane_id,
27 unicode_or_None(task['task']['external_id']))
28 model_card.status = unicode_or_None(task_status['name'])
29+ model_card.team = unicode_or_None(card_type_name)
30+ model_card.priority = u"%s" % task['task']['priority']
31+ model_card.size = unicode_or_None(task['task']['size_estimate'])
32+ model_card.sponsor = unicode_or_None(task['task']['custom_field_1'])
33+ model_card.description = u"description"
34+ model_card.acceptance_criteria = u"acceptance criteria"
35 collector.store_card(model_card)
36 else:
37 dbg("Task '%s' does not have a status." % task['task']['name'])
38
39=== modified file 'html-report'
40--- html-report 2011-10-03 14:51:06 +0000
41+++ html-report 2011-10-19 15:16:57 +0000
42@@ -502,14 +502,10 @@
43 blueprints = report_tools.card_blueprints(store, card.roadmap_id)
44
45 data.update(dict(page_type="roadmap_card"))
46- data.update(dict(card=title))
47- data.update(dict(status=card.status))
48+ data.update(dict(card_title=title))
49+ data.update(dict(card=card))
50 data.update(dict(lane=lane.name))
51 data.update(dict(blueprints=blueprints))
52- data.update(dict(description=""))
53- data.update(dict(acceptance_criteria=""))
54- data.update(dict(sponsor_name=""))
55- data.update(dict(contact_name=""))
56
57 print report_tools.fill_template(
58 "roadmap_card.html", data, theme=opts.theme)
59
60=== modified file 'lpworkitems/database.py'
61--- lpworkitems/database.py 2011-10-03 14:18:00 +0000
62+++ lpworkitems/database.py 2011-10-19 15:16:57 +0000
63@@ -7,7 +7,7 @@
64 store.execute('''CREATE TABLE version (
65 db_layout_ref INT NOT NULL
66 )''')
67- store.execute('''INSERT INTO version VALUES (12)''')
68+ store.execute('''INSERT INTO version VALUES (13)''')
69
70 store.execute('''CREATE TABLE specs (
71 name VARCHAR(255) PRIMARY KEY,
72@@ -100,6 +100,13 @@
73 name VARCHAR(200) NOT NULL,
74 card_id NOT NULL,
75 status VARCHAR(50),
76+ team VARCHAR(50),
77+ priority VARCHAR(50),
78+ size VARCHAR(50),
79+ sponsor VARCHAR(50),
80+ contact VARCHAR(50),
81+ description BLOB,
82+ acceptance_criteria BLOB,
83 roadmap_id VARCHAR(50),
84 lane_id REFERENCES lane(lane_id)
85 )''')
86@@ -209,6 +216,16 @@
87 if ver == 11:
88 store.execute('ALTER TABLE card ADD COLUMN roadmap_id VARCHAR(50)')
89 store.execute('UPDATE version SET db_layout_ref = 12')
90+ ver = 12
91+ if ver == 12:
92+ store.execute('ALTER TABLE card ADD COLUMN team VARCHAR(50)')
93+ store.execute('ALTER TABLE card ADD COLUMN priority VARCHAR(50)')
94+ store.execute('ALTER TABLE card ADD COLUMN size VARCHAR(50)')
95+ store.execute('ALTER TABLE card ADD COLUMN sponsor VARCHAR(50)')
96+ store.execute('ALTER TABLE card ADD COLUMN contact VARCHAR(50)')
97+ store.execute('ALTER TABLE card ADD COLUMN description BLOB')
98+ store.execute('ALTER TABLE card ADD COLUMN acceptance_criteria BLOB')
99+ store.execute('UPDATE version SET db_layout_ref = 13')
100
101
102 def get_store(dbpath):
103
104=== modified file 'lpworkitems/models_roadmap.py'
105--- lpworkitems/models_roadmap.py 2011-10-03 14:18:00 +0000
106+++ lpworkitems/models_roadmap.py 2011-10-19 15:16:57 +0000
107@@ -14,6 +14,13 @@
108 card_id = Int(primary=True)
109 lane_id = Int()
110 roadmap_id = Unicode()
111+ team = Unicode()
112+ priority = Unicode()
113+ size = Unicode()
114+ sponsor = Unicode()
115+ contact = Unicode()
116+ description = Unicode()
117+ acceptance_criteria = Unicode()
118
119 def __init__(self, name, card_id, lane_id, roadmap_id):
120 self.lane_id = lane_id
121
122=== modified file 'templates/roadmap_card.html'
123--- templates/roadmap_card.html 2011-10-03 14:51:06 +0000
124+++ templates/roadmap_card.html 2011-10-19 15:16:57 +0000
125@@ -7,17 +7,20 @@
126 %>
127
128 <%def name="title()">
129-${card}
130+${card_title}
131 </%def>
132
133 <h1>${title()}</h1>
134-<h2>${status} in <a href="roadmap-${lane}.html">${lane}</a></h2>
135+<h2>${card.status} in <a href="roadmap-${lane}.html">${lane}</a></h2>
136 <p>
137 <ul>
138- <li>Description: ${description}
139- <li>Acceptance criteria: ${acceptance_criteria}
140- <li>Sponsor: ${sponsor_name}
141- <li>Contact: ${contact_name}
142+ <li>Description: ${card.description}
143+ <li>Acceptance criteria: ${card.acceptance_criteria}
144+ <li>Sponsor: ${card.sponsor}
145+ <li>Contact: ${card.contact}
146+ <li>Priority: ${card.priority}
147+ <li>Size: ${card.size}
148+ <li>Team: ${card.team}
149 </ul>
150
151 <p>
152
153=== modified file 'templates/roadmap_lane.html'
154--- templates/roadmap_lane.html 2011-10-11 08:00:27 +0000
155+++ templates/roadmap_lane.html 2011-10-19 15:16:57 +0000
156@@ -22,9 +22,9 @@
157 <a href="roadmap-card-${card.roadmap_id}.html">${card.name}</a>
158 </th></tr>
159 </thead>
160- <tr><td colspan=2>Description of what this requirement is all about.</td></tr>
161+ <tr><td colspan=2>${card.description}</td></tr>
162 <tr><td>Done: n</td><td>&nbsp</td></tr>
163- <tr><td><a href="">Team X</a></td><td align=right>Priority</td></tr>
164+ <tr><td><a href="">${card.team}</a></td><td align=right>Priority ${card.priority}</td></tr>
165 </table>
166 <p><p>
167 % endfor

Subscribers

People subscribed via source and target branches