Merge lp:~adeuring/launchpad/bug-581626 into lp:launchpad

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 11539
Proposed branch: lp:~adeuring/launchpad/bug-581626
Merge into: lp:launchpad
Diff against target: 129 lines (+60/-26)
2 files modified
lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt (+58/-24)
lib/lp/bugs/templates/bug-listing-detailed.pt (+2/-2)
To merge this branch: bzr merge lp:~adeuring/launchpad/bug-581626
Reviewer Review Type Date Requested Status
Henning Eggers (community) code Approve
Review via email: mp+35281@code.launchpad.net

Commit message

show links to the bug targets in the "recently reported" and "recently fixed" lists of LPs main bug page.

Description of the change

This branch is a fix for bug 581626: "Project names aren't linked on Bugs front page".

test: ./bin/test -t xx-front-page-bug-lists.txt

no lint

To post a comment you must log in.
Revision history for this message
Henning Eggers (henninge) wrote :

Thanks, Abel!
Just two little things:

- Typo in "The text for each bigs ..."
- the "for" loop could be a function that you can use twice, e.g. "print_bug_links"

Henning

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt'
2--- lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt 2010-02-09 12:13:43 +0000
3+++ lib/lp/bugs/stories/bugs/xx-front-page-bug-lists.txt 2010-09-13 13:54:47 +0000
4@@ -41,28 +41,50 @@
5 </span>
6
7 The list of recently reported bugs contains up to the last 5 bugs reported
8-across Launchpad.
9+across Launchpad. The text for each bug contains links to the bug itself,
10+to the bug target and to the bug reporter's page.
11
12+ >>> def print_bugs_links(bug_row):
13+ ... icon_td, summary_td, = bug_row('td')
14+ ... print "%s: %s" % (
15+ ... summary_td.b.a.renderContents().strip(),
16+ ... summary_td.a.renderContents())
17+ ... bug_link, bug_target_link, bug_reporter_link = summary_td('a')
18+ ... print bug_link['href']
19+ ... print bug_target_link['href']
20+ ... print bug_reporter_link['href']
21 >>> for tr in reported_bugs('tr'):
22- ... icon_td, summary_td, = tr('td')
23- ... print "%s: %s" % (
24- ... summary_td.b.renderContents().strip(),
25- ... summary_td.a.renderContents())
26- Bigfixer:
27- Summary for new bug ...
28- <BLANKLINE>
29- Bigfixer:
30- Summary for new bug ...
31- <BLANKLINE>
32- Bigfixer:
33- Summary for new bug ...
34- <BLANKLINE>
35- Bigfixer:
36- Summary for new bug ...
37- <BLANKLINE>
38- Bigfixer:
39- Summary for new bug ...
40- <BLANKLINE>
41+ ... print_bugs_links(tr)
42+ Bigfixer:
43+ Summary for new bug ...
44+ <BLANKLINE>
45+ /bugs/...
46+ /bigfixer
47+ http://launchpad.dev/~person-name...
48+ Bigfixer:
49+ Summary for new bug ...
50+ <BLANKLINE>
51+ /bugs/...
52+ /bigfixer
53+ http://launchpad.dev/~person-name...
54+ Bigfixer:
55+ Summary for new bug ...
56+ <BLANKLINE>
57+ /bugs/...
58+ /bigfixer
59+ http://launchpad.dev/~person-name...
60+ Bigfixer:
61+ Summary for new bug ...
62+ <BLANKLINE>
63+ /bugs/...
64+ /bigfixer
65+ http://launchpad.dev/~person-name...
66+ Bigfixer:
67+ Summary for new bug ...
68+ <BLANKLINE>
69+ /bugs/...
70+ /bigfixer
71+ http://launchpad.dev/~person-name...
72
73
74 Fixed bugs
75@@ -84,22 +106,34 @@
76 across Launchpad.
77
78 >>> for tr in fixed_bugs('tr'):
79- ... icon_td, summary_td, = tr('td')
80- ... print "%s: %s" % (
81- ... summary_td.b.renderContents().strip(),
82- ... summary_td.a.renderContents())
83+ ... print_bugs_links(tr)
84 Bigfixer:
85 Summary for new bug 10
86 <BLANKLINE>
87+ /bugs/...
88+ /bigfixer
89+ http://launchpad.dev/~person-name...
90 Bigfixer:
91 Summary for new bug 9
92 <BLANKLINE>
93+ /bugs/...
94+ /bigfixer
95+ http://launchpad.dev/~person-name...
96 Bigfixer:
97 Summary for new bug 8
98 <BLANKLINE>
99+ /bugs/...
100+ /bigfixer
101+ http://launchpad.dev/~person-name...
102 Bigfixer:
103 Summary for new bug 7
104 <BLANKLINE>
105+ /bugs/...
106+ /bigfixer
107+ http://launchpad.dev/~person-name...
108 Bigfixer:
109 Summary for new bug 6
110 <BLANKLINE>
111+ /bugs/...
112+ /bigfixer
113+ http://launchpad.dev/~person-name...
114
115=== modified file 'lib/lp/bugs/templates/bug-listing-detailed.pt'
116--- lib/lp/bugs/templates/bug-listing-detailed.pt 2010-01-12 14:13:26 +0000
117+++ lib/lp/bugs/templates/bug-listing-detailed.pt 2010-09-13 13:54:47 +0000
118@@ -10,9 +10,9 @@
119 </a>
120 </div>
121 <div class="lesser">
122- in
123+ in
124 <tal:per_pillar repeat="pillar context/affected_pillars">
125- <b tal:content="pillar/displayname" />,
126+ <b tal:content="structure pillar/fmt:link:bugs" />,
127 </tal:per_pillar>
128 reported
129 <span