Merge lp:~deryck/launchpad/no-lp-bugs-homepage-439245 into lp:launchpad
- no-lp-bugs-homepage-439245
- Merge into devel
Proposed by
Deryck Hodge
Status: | Merged |
---|---|
Approved by: | Deryck Hodge |
Approved revision: | not available |
Merged at revision: | not available |
Proposed branch: | lp:~deryck/launchpad/no-lp-bugs-homepage-439245 |
Merge into: | lp:launchpad |
Diff against target: |
444 lines (+179/-176) 6 files modified
lib/lp/bugs/stories/bugs/xx-front-page-info.txt (+41/-0) lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt (+2/-18) lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt (+0/-33) lib/lp/bugs/stories/bugtask-searches/xx-advanced-upstream-pending-bugwatch.txt (+1/-36) lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt (+27/-1) lib/lp/bugs/templates/bugtarget-bugs.pt (+108/-88) |
To merge this branch: | bzr merge lp:~deryck/launchpad/no-lp-bugs-homepage-439245 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Albisetti (community) | ui | Approve | |
Eleanor Berger (community) | Approve | ||
Review via email: mp+17634@code.launchpad.net |
Commit message
Don't enable a bugs home page for projects that don't use Launchpad for bug tracking.
Description of the change
To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) wrote : | # |
Revision history for this message
Eleanor Berger (intellectronica) wrote : | # |
Very nice branch, great to see these bugs fixed at last. As we discussed IRL, a few very minor comments:
1. The text in the doctest reads nicer if its written consistently in present tense.
2. You can use tal:replace instead of tal:content when including the project title to save an unnecessary span element. Just think what it will do for your carbon footprint!
Finally, I'm not sure turning the search box off if no bugs are filed (on a project that does use LP) is better, because one could argue that it helps to have the UI be consistent, so that it's easy to learn. I don't feel deeply about it, but I suggest maybe running it by Martin or Michael.
review:
Approve
Revision history for this message
Deryck Hodge (deryck) wrote : | # |
Revision history for this message
Martin Albisetti (beuno) : | # |
review:
Approve
(ui)
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'lib/lp/bugs/stories/bugs/xx-front-page-info.txt' | |||
2 | --- lib/lp/bugs/stories/bugs/xx-front-page-info.txt 1970-01-01 00:00:00 +0000 | |||
3 | +++ lib/lp/bugs/stories/bugs/xx-front-page-info.txt 2010-01-19 16:41:16 +0000 | |||
4 | @@ -0,0 +1,41 @@ | |||
5 | 1 | A bugs home page for a project shows different information, depending | ||
6 | 2 | on whether or not the project uses malone for bug tracking. | ||
7 | 3 | |||
8 | 4 | By default, projects are created without using any bugtracker, malone | ||
9 | 5 | or otherwise. To demonstrate this, a new project is created. | ||
10 | 6 | |||
11 | 7 | >>> from canonical.launchpad.ftests import login, logout | ||
12 | 8 | >>> login('foo.bar@canonical.com') | ||
13 | 9 | >>> test_project = factory.makeProduct( | ||
14 | 10 | ... name='test-project', title='Simple Test Project') | ||
15 | 11 | >>> logout() | ||
16 | 12 | |||
17 | 13 | The bugs home page for the project states that the project does | ||
18 | 14 | not use Launchpad for bug tracking. | ||
19 | 15 | |||
20 | 16 | >>> anon_browser.open('http://bugs.launchpad.dev/test-project') | ||
21 | 17 | >>> uses_malone_p = find_tag_by_id(anon_browser.contents, 'no-malone') | ||
22 | 18 | >>> print extract_text(uses_malone_p) | ||
23 | 19 | Simple Test Project does not use Launchpad for bug tracking. | ||
24 | 20 | |||
25 | 21 | The bugs home page for a project using Launchpad for bug tracking | ||
26 | 22 | shows controls for setting bug supervisor and states that no | ||
27 | 23 | bugs have been filed. | ||
28 | 24 | |||
29 | 25 | >>> login('foo.bar@canonical.com') | ||
30 | 26 | >>> uses_malone = factory.makeProduct( | ||
31 | 27 | ... name='uses-malone', title='Project Uses Malone', | ||
32 | 28 | ... official_malone=True) | ||
33 | 29 | >>> logout() | ||
34 | 30 | |||
35 | 31 | >>> anon_browser.open('http://bugs.launchpad.dev/uses-malone') | ||
36 | 32 | >>> bug_supervisor = find_tag_by_id( | ||
37 | 33 | ... anon_browser.contents, 'bug-supervisor') | ||
38 | 34 | >>> print extract_text(bug_supervisor) | ||
39 | 35 | Bug supervisor: | ||
40 | 36 | None set | ||
41 | 37 | |||
42 | 38 | >>> bug_list = find_tag_by_id( | ||
43 | 39 | ... anon_browser.contents, 'no-bugs-filed') | ||
44 | 40 | >>> print extract_text(bug_list) | ||
45 | 41 | There are currently no bugs filed against Project Uses Malone. | ||
46 | 0 | 42 | ||
47 | === modified file 'lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt' | |||
48 | --- lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt 2009-08-17 16:41:22 +0000 | |||
49 | +++ lib/lp/bugs/stories/bugs/xx-portlets-bug-series.txt 2010-01-19 16:41:16 +0000 | |||
50 | @@ -25,24 +25,8 @@ | |||
51 | 25 | >>> print anon_browser.getLink("hoary").url | 25 | >>> print anon_browser.getLink("hoary").url |
52 | 26 | http://bugs.launchpad.dev/ubuntu/hoary/+bugs | 26 | http://bugs.launchpad.dev/ubuntu/hoary/+bugs |
53 | 27 | 27 | ||
72 | 28 | The same portlet is available on the bugs homepage for the distro: | 28 | The same portlet is also available for project and project series |
73 | 29 | 29 | listings and homepages: | |
56 | 30 | >>> anon_browser.open("http://bugs.launchpad.dev/debian/+bugs-index") | ||
57 | 31 | >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs") | ||
58 | 32 | >>> print extract_text(portlet) | ||
59 | 33 | Series-targeted bugs | ||
60 | 34 | sarge 1 | ||
61 | 35 | woody 2 | ||
62 | 36 | |||
63 | 37 | >>> anon_browser.open("http://bugs.launchpad.dev/debian/sarge/+bugs-index") | ||
64 | 38 | >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs") | ||
65 | 39 | >>> print extract_text(portlet) | ||
66 | 40 | Series-targeted bugs | ||
67 | 41 | sarge 1 | ||
68 | 42 | woody 2 | ||
69 | 43 | |||
70 | 44 | It's also available for project and project series listings and | ||
71 | 45 | homepages: | ||
74 | 46 | 30 | ||
75 | 47 | >>> anon_browser.open("http://bugs.launchpad.dev/firefox/+bugs") | 31 | >>> anon_browser.open("http://bugs.launchpad.dev/firefox/+bugs") |
76 | 48 | >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs") | 32 | >>> portlet = find_portlet(anon_browser.contents, "Series-targeted bugs") |
77 | 49 | 33 | ||
78 | === modified file 'lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt' | |||
79 | --- lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2009-12-15 03:25:42 +0000 | |||
80 | +++ lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2010-01-19 16:41:16 +0000 | |||
81 | @@ -44,21 +44,6 @@ | |||
82 | 44 | 1 Firefox does not support SVG | 44 | 1 Firefox does not support SVG |
83 | 45 | Low New | 45 | Low New |
84 | 46 | 46 | ||
85 | 47 | The page displays the number of bugs that need forwarding upstream for | ||
86 | 48 | products that do not use malone. See xx-product-pending-bugwatch for | ||
87 | 49 | more explanation of why this link is present, and how it is used. | ||
88 | 50 | |||
89 | 51 | >>> anon_browser.goBack(1) | ||
90 | 52 | >>> need_forwarding_bugs_link = anon_browser.getLink( | ||
91 | 53 | ... 'Bugs need forwarding upstream') | ||
92 | 54 | Traceback (most recent call last): | ||
93 | 55 | ... | ||
94 | 56 | LinkNotFoundError | ||
95 | 57 | |||
96 | 58 | >>> anon_browser.open('http://bugs.launchpad.dev/alsa-utils') | ||
97 | 59 | >>> need_forwarding_bugs_link = anon_browser.getLink( | ||
98 | 60 | ... 'Bugs need forwarding upstream') | ||
99 | 61 | |||
100 | 62 | 47 | ||
101 | 63 | == Bugs Fixed Elsewhere == | 48 | == Bugs Fixed Elsewhere == |
102 | 64 | 49 | ||
103 | @@ -80,24 +65,6 @@ | |||
104 | 80 | <p>There are currently no open bugs.</p> | 65 | <p>There are currently no open bugs.</p> |
105 | 81 | ... | 66 | ... |
106 | 82 | 67 | ||
107 | 83 | This also works for products not using Launchpad Bugs directly. For | ||
108 | 84 | example users can see all bugs raised against Mozilla Thunderbird that | ||
109 | 85 | are fixed in some other context: | ||
110 | 86 | |||
111 | 87 | >>> anon_browser.open('http://bugs.launchpad.dev/thunderbird') | ||
112 | 88 | >>> fixed_elsewhere_link = anon_browser.getLink('Bugs fixed elsewhere') | ||
113 | 89 | |||
114 | 90 | Again, the link takes you to the list of the bugs fixed elsewhere.: | ||
115 | 91 | |||
116 | 92 | >>> fixed_elsewhere_link.click() | ||
117 | 93 | >>> anon_browser.url | ||
118 | 94 | 'http://.../+bugs?field.status_upstream=resolved_upstream' | ||
119 | 95 | |||
120 | 96 | >>> print find_main_content(anon_browser.contents) | ||
121 | 97 | <... | ||
122 | 98 | <p>There are currently no open bugs.</p> | ||
123 | 99 | ... | ||
124 | 100 | |||
125 | 101 | 68 | ||
126 | 102 | == Expirable Bugs == | 69 | == Expirable Bugs == |
127 | 103 | 70 | ||
128 | 104 | 71 | ||
129 | === modified file 'lib/lp/bugs/stories/bugtask-searches/xx-advanced-upstream-pending-bugwatch.txt' | |||
130 | --- lib/lp/bugs/stories/bugtask-searches/xx-advanced-upstream-pending-bugwatch.txt 2009-10-02 15:16:03 +0000 | |||
131 | +++ lib/lp/bugs/stories/bugtask-searches/xx-advanced-upstream-pending-bugwatch.txt 2010-01-19 16:41:16 +0000 | |||
132 | @@ -8,20 +8,6 @@ | |||
133 | 8 | locate the bugs that need a bugwatch setup. | 8 | locate the bugs that need a bugwatch setup. |
134 | 9 | 9 | ||
135 | 10 | 10 | ||
136 | 11 | == Common searches on a product's bug page (part 1) == | ||
137 | 12 | |||
138 | 13 | No Privileges Person visits the alsa-utils front page on Launchpad. | ||
139 | 14 | He wants to link Launchpad bugs to to the upstream bug tracker. He can | ||
140 | 15 | see that there are '0 bugs need forwarding upstream'. | ||
141 | 16 | |||
142 | 17 | >>> user_browser.open('http://bugs.launchpad.dev/alsa-utils/') | ||
143 | 18 | >>> user_browser.title | ||
144 | 19 | 'Bugs in ALSA utilities' | ||
145 | 20 | |||
146 | 21 | >>> pending_watches_link = user_browser.getLink( | ||
147 | 22 | ... 'Bugs fixed elsewhere') | ||
148 | 23 | |||
149 | 24 | |||
150 | 25 | == Marking and searching for pending bugwatches == | 11 | == Marking and searching for pending bugwatches == |
151 | 26 | 12 | ||
152 | 27 | Sample Person is doing some bug reporting and triage for his adopted | 13 | Sample Person is doing some bug reporting and triage for his adopted |
153 | @@ -50,8 +36,7 @@ | |||
154 | 50 | chooses to search for all bugs that need to be forwarded upstream. | 36 | chooses to search for all bugs that need to be forwarded upstream. |
155 | 51 | He sees one match. | 37 | He sees one match. |
156 | 52 | 38 | ||
159 | 53 | >>> browser.open('http://bugs.launchpad.dev/alsa-utils/') | 39 | >>> browser.open('http://bugs.launchpad.dev/alsa-utils/+bugs?advanced=1') |
158 | 54 | >>> browser.getLink('Advanced search').click() | ||
160 | 55 | >>> pending_bugwatch_label = ( | 40 | >>> pending_bugwatch_label = ( |
161 | 56 | ... 'Show bugs that need to be forwarded to an upstream ' | 41 | ... 'Show bugs that need to be forwarded to an upstream ' |
162 | 57 | ... 'bug tracker') | 42 | ... 'bug tracker') |
163 | @@ -61,23 +46,3 @@ | |||
164 | 61 | >>> print extract_text(bug_listing) | 46 | >>> print extract_text(bug_listing) |
165 | 62 | Summary Importance Status | 47 | Summary Importance Status |
166 | 63 | ...Test Bug 1 Undecided New | 48 | ...Test Bug 1 Undecided New |
167 | 64 | |||
168 | 65 | |||
169 | 66 | == Common searches on a product's bug page (part 2) == | ||
170 | 67 | |||
171 | 68 | No Privileges Person returns to the alsa-utils front page on Launchpad. | ||
172 | 69 | He wants to link bugs to to the upstream bug tracker. | ||
173 | 70 | |||
174 | 71 | >>> user_browser.open('http://bugs.launchpad.dev/alsa-utils/') | ||
175 | 72 | >>> user_browser.title | ||
176 | 73 | 'Bugs in ALSA utilities' | ||
177 | 74 | |||
178 | 75 | >>> pending_watches_link = user_browser.getLink( | ||
179 | 76 | ... 'Bugs need forwarding upstream') | ||
180 | 77 | >>> pending_watches_link.click() | ||
181 | 78 | |||
182 | 79 | >>> bug_listing = find_tag_by_id(user_browser.contents, 'buglisting') | ||
183 | 80 | >>> print extract_text(bug_listing) | ||
184 | 81 | Summary Importance Status | ||
185 | 82 | ...Test Bug 1 Undecided New | ||
186 | 83 | |||
187 | 84 | 49 | ||
188 | === modified file 'lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt' | |||
189 | --- lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt 2009-11-12 15:33:27 +0000 | |||
190 | +++ lib/lp/bugs/stories/initial-bug-contacts/10-set-upstream-bugcontact.txt 2010-01-19 16:41:16 +0000 | |||
191 | @@ -110,11 +110,37 @@ | |||
192 | 110 | >>> sample_browser.url | 110 | >>> sample_browser.url |
193 | 111 | 'http://launchpad.dev/testy' | 111 | 'http://launchpad.dev/testy' |
194 | 112 | 112 | ||
195 | 113 | By default, a newly created project doesn't use Launchpad for bug | ||
196 | 114 | tracking, and none of the bug lists or edit controls will be | ||
197 | 115 | available. | ||
198 | 116 | |||
199 | 117 | >>> sample_browser.getLink('Bugs').click() | ||
200 | 118 | >>> uses_malone_p = find_tag_by_id(sample_browser.contents, 'no-malone') | ||
201 | 119 | >>> print extract_text(uses_malone_p) | ||
202 | 120 | A product for testing things does not use Launchpad for bug tracking. | ||
203 | 121 | |||
204 | 122 | We can change the settings to use Launchpad for bug tracking. | ||
205 | 123 | |||
206 | 124 | >>> sample_browser.getLink( | ||
207 | 125 | ... 'Enable bug tracking.').click() | ||
208 | 126 | >>> print sample_browser.title | ||
209 | 127 | Change A product for testing things's details : Bugs : Test Product | ||
210 | 128 | >>> sample_browser.getControl('In Launchpad').click() | ||
211 | 129 | >>> sample_browser.getControl('Change').click() | ||
212 | 130 | |||
213 | 131 | Now, information about bug tracking (bug supervisor, security contact) | ||
214 | 132 | and their edit controls are available on the page. | ||
215 | 133 | |||
216 | 134 | >>> bug_supervisor = find_tag_by_id( | ||
217 | 135 | ... sample_browser.contents, 'bug-supervisor') | ||
218 | 136 | >>> print extract_text(bug_supervisor) | ||
219 | 137 | Bug supervisor: | ||
220 | 138 | None set | ||
221 | 139 | |||
222 | 113 | Sample Person is a member of "Warty Security Team". However, he should not be | 140 | Sample Person is a member of "Warty Security Team". However, he should not be |
223 | 114 | able to set Warty Security Team as a bug supervisor for Test Project as he's | 141 | able to set Warty Security Team as a bug supervisor for Test Project as he's |
224 | 115 | not an admin of that team. | 142 | not an admin of that team. |
225 | 116 | 143 | ||
226 | 117 | >>> sample_browser.getLink('Bugs').click() | ||
227 | 118 | >>> sample_browser.getLink('Change bug supervisor').click() | 144 | >>> sample_browser.getLink('Change bug supervisor').click() |
228 | 119 | >>> sample_browser.url | 145 | >>> sample_browser.url |
229 | 120 | 'http://bugs.launchpad.dev/testy/+bugsupervisor' | 146 | 'http://bugs.launchpad.dev/testy/+bugsupervisor' |
230 | 121 | 147 | ||
231 | === modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt' | |||
232 | --- lib/lp/bugs/templates/bugtarget-bugs.pt 2009-12-19 19:12:34 +0000 | |||
233 | +++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-01-19 16:41:16 +0000 | |||
234 | @@ -14,7 +14,7 @@ | |||
235 | 14 | <script type="text/javascript" src="/+icing/PlotKit_Packed.js"></script> | 14 | <script type="text/javascript" src="/+icing/PlotKit_Packed.js"></script> |
236 | 15 | </metal:block> | 15 | </metal:block> |
237 | 16 | <body> | 16 | <body> |
239 | 17 | <tal:side metal:fill-slot="side"> | 17 | <tal:side metal:fill-slot="side" condition="view/uses_launchpad_bugtracker"> |
240 | 18 | <div id="involvement" class="portlet involvement"> | 18 | <div id="involvement" class="portlet involvement"> |
241 | 19 | <ul> | 19 | <ul> |
242 | 20 | <li style="border: none"> | 20 | <li style="border: none"> |
243 | @@ -45,94 +45,114 @@ | |||
244 | 45 | tal:define="search_url string:+bugs; | 45 | tal:define="search_url string:+bugs; |
245 | 46 | advanced_search_url string:+bugs?advanced=1"> | 46 | advanced_search_url string:+bugs?advanced=1"> |
246 | 47 | 47 | ||
285 | 48 | <div class="portlet" style="float: right; border: none"> | 48 | <tal:uses_malone condition="view/uses_launchpad_bugtracker"> |
286 | 49 | <ul> | 49 | <div class="portlet" style="float: right; border: none"> |
287 | 50 | <li id="bugtracker" tal:condition="not: view/uses_launchpad_bugtracker"> | 50 | <ul> |
288 | 51 | <strong>Bug tracker:</strong><br /> | 51 | <li id="bugtracker" tal:condition="not: view/uses_launchpad_bugtracker"> |
289 | 52 | <span style="margin-left: 1em"> | 52 | <strong>Bug tracker:</strong><br /> |
290 | 53 | <tal:bugtracker replace="structure view/bugtracker" /> | 53 | <span style="margin-left: 1em"> |
291 | 54 | </span> | 54 | <tal:bugtracker replace="structure view/bugtracker" /> |
292 | 55 | </li> | 55 | </span> |
293 | 56 | <li tal:define="bug_supervisor context/bug_supervisor"> | 56 | </li> |
294 | 57 | Bug supervisor:<br /> | 57 | <li id="bug-supervisor" |
295 | 58 | <span style="margin-left: 1em"> | 58 | tal:define="bug_supervisor context/bug_supervisor"> |
296 | 59 | <tal:none condition="not:bug_supervisor">None set</tal:none> | 59 | Bug supervisor:<br /> |
297 | 60 | <a tal:condition="bug_supervisor" | 60 | <span style="margin-left: 1em"> |
298 | 61 | tal:replace="structure bug_supervisor/fmt:link">Bob Johnson</a> | 61 | <tal:none condition="not:bug_supervisor">None set</tal:none> |
299 | 62 | <tal:edit-bug-supervisor | 62 | <a tal:condition="bug_supervisor" |
300 | 63 | condition="context/menu:bugs/bugsupervisor|nothing"> | 63 | tal:replace="structure bug_supervisor/fmt:link">Bob Johnson</a> |
301 | 64 | <a tal:define="link context/menu:bugs/bugsupervisor" | 64 | <tal:edit-bug-supervisor |
302 | 65 | tal:condition="link/enabled" | 65 | condition="context/menu:bugs/bugsupervisor|nothing"> |
303 | 66 | tal:attributes="href link/url; title link/text"> | 66 | <a tal:define="link context/menu:bugs/bugsupervisor" |
304 | 67 | <img tal:attributes="alt link/text" src="/@@/edit" /> | 67 | tal:condition="link/enabled" |
305 | 68 | </a> | 68 | tal:attributes="href link/url; title link/text"> |
306 | 69 | </tal:edit-bug-supervisor> | 69 | <img tal:attributes="alt link/text" src="/@@/edit" /> |
307 | 70 | </span> | 70 | </a> |
308 | 71 | </li> | 71 | </tal:edit-bug-supervisor> |
309 | 72 | <li tal:define="securitycontact context/security_contact"> | 72 | </span> |
310 | 73 | Security contact:<br /> | 73 | </li> |
311 | 74 | <span style="margin-left: 1em"> | 74 | <li id="bug-security" |
312 | 75 | <tal:none condition="not:securitycontact">None set</tal:none> | 75 | tal:define="securitycontact context/security_contact"> |
313 | 76 | <a tal:condition="securitycontact" | 76 | Security contact:<br /> |
314 | 77 | tal:replace="structure securitycontact/fmt:link"> | 77 | <span style="margin-left: 1em"> |
315 | 78 | Billy Anderson | 78 | <tal:none condition="not:securitycontact">None set</tal:none> |
316 | 79 | </a> | 79 | <a tal:condition="securitycontact" |
317 | 80 | <tal:edit-securitycontact | 80 | tal:replace="structure securitycontact/fmt:link"> |
318 | 81 | condition="context/menu:bugs/securitycontact|nothing"> | 81 | Billy Anderson |
281 | 82 | <a tal:define="link context/menu:bugs/securitycontact" | ||
282 | 83 | tal:condition="link/enabled" | ||
283 | 84 | tal:attributes="href link/url; title link/text"> | ||
284 | 85 | <img tal:attributes="alt link/text" src="/@@/edit" /> | ||
319 | 86 | </a> | 82 | </a> |
369 | 87 | </tal:edit-securitycontact> | 83 | <tal:edit-securitycontact |
370 | 88 | </span> | 84 | condition="context/menu:bugs/securitycontact|nothing"> |
371 | 89 | </li> | 85 | <a tal:define="link context/menu:bugs/securitycontact" |
372 | 90 | <li> | 86 | tal:condition="link/enabled" |
373 | 91 | </li> | 87 | tal:attributes="href link/url; title link/text"> |
374 | 92 | </ul> | 88 | <img tal:attributes="alt link/text" src="/@@/edit" /> |
375 | 93 | </div> | 89 | </a> |
376 | 94 | 90 | </tal:edit-securitycontact> | |
377 | 95 | <div class="search-box"> | 91 | </span> |
378 | 96 | <metal:search | 92 | </li> |
379 | 97 | use-macro="context/@@+bugtarget-macros-search/simple-search-form" | 93 | <li> |
380 | 98 | /> | 94 | </li> |
381 | 99 | </div> | 95 | </ul> |
382 | 100 | <script type="text/javascript"><!-- | 96 | </div> |
383 | 101 | $('field.searchtext').focus(); | 97 | |
384 | 102 | --></script> | 98 | <tal:has_hot_bugs condition="view/hot_bugtasks"> |
385 | 103 | 99 | <div class="search-box"> | |
386 | 104 | <h2 style="margin-top: 1em">Hot bugs</h2> | 100 | <metal:search |
387 | 105 | 101 | use-macro="context/@@+bugtarget-macros-search/simple-search-form" | |
388 | 106 | <table class="listing" id="hot-bugs"> | 102 | /> |
389 | 107 | <thead> | 103 | </div> |
390 | 108 | <tr> | 104 | <script type="text/javascript"><!-- |
391 | 109 | <th colspan="3">Summary</th> | 105 | $('field.searchtext').focus(); |
392 | 110 | <th>Status</th> | 106 | --></script> |
393 | 111 | <th>Importance</th> | 107 | |
394 | 112 | <th>Last changed</th> | 108 | <h2 style="margin-top: 1em">Hot bugs</h2> |
395 | 113 | </tr> | 109 | |
396 | 114 | </thead> | 110 | <table class="listing" id="hot-bugs"> |
397 | 115 | <tbody> | 111 | <thead> |
398 | 116 | <tr tal:repeat="bugtask view/hot_bugtasks"> | 112 | <tr> |
399 | 117 | <td class="icon left"> | 113 | <th colspan="3">Summary</th> |
400 | 118 | <img alt="" src="/@@/bug" /> | 114 | <th>Status</th> |
401 | 119 | </td> | 115 | <th>Importance</th> |
402 | 120 | <td style="text-align: right"> | 116 | <th>Last changed</th> |
403 | 121 | #<span tal:replace="bugtask/bug/id" /> | 117 | </tr> |
404 | 122 | </td> | 118 | </thead> |
405 | 123 | <td> | 119 | <tbody> |
406 | 124 | <a tal:attributes="href bugtask/fmt:url" | 120 | <tr tal:repeat="bugtask view/hot_bugtasks"> |
407 | 125 | tal:content="bugtask/bug/title" /> | 121 | <td class="icon left"> |
408 | 126 | </td> | 122 | <img alt="" src="/@@/bug" /> |
409 | 127 | <td tal:attributes="class string:status${bugtask/status/name}" | 123 | </td> |
410 | 128 | tal:content="bugtask/status/title" /> | 124 | <td style="text-align: right"> |
411 | 129 | <td tal:attributes=" | 125 | #<span tal:replace="bugtask/bug/id" /> |
412 | 130 | class string:importance${bugtask/importance/name}" | 126 | </td> |
413 | 131 | tal:content="bugtask/importance/title" /> | 127 | <td> |
414 | 132 | <td tal:content="bugtask/bug/date_last_updated/fmt:displaydate" /> | 128 | <a tal:attributes="href bugtask/fmt:url" |
415 | 133 | </tr> | 129 | tal:content="bugtask/bug/title" /> |
416 | 134 | </tbody> | 130 | </td> |
417 | 135 | </table> | 131 | <td tal:attributes="class string:status${bugtask/status/name}" |
418 | 132 | tal:content="bugtask/status/title" /> | ||
419 | 133 | <td tal:attributes=" | ||
420 | 134 | class string:importance${bugtask/importance/name}" | ||
421 | 135 | tal:content="bugtask/importance/title" /> | ||
422 | 136 | <td tal:content="bugtask/bug/date_last_updated/fmt:displaydate" /> | ||
423 | 137 | </tr> | ||
424 | 138 | </tbody> | ||
425 | 139 | </table> | ||
426 | 140 | </tal:has_hot_bugs> | ||
427 | 141 | |||
428 | 142 | <tal:no_hot_bugs condition="not: view/hot_bugtasks"> | ||
429 | 143 | <p id="no-bugs-filed"><strong>There are currently no bugs filed against | ||
430 | 144 | <tal:project_title replace="context/title" />.</strong></p> | ||
431 | 145 | |||
432 | 146 | <p id="no-bugs-report"><a href="+filebug">Report a bug.</a></p> | ||
433 | 147 | </tal:no_hot_bugs> | ||
434 | 148 | </tal:uses_malone> | ||
435 | 149 | |||
436 | 150 | <tal:not_uses_malone condition="not: view/uses_launchpad_bugtracker"> | ||
437 | 151 | <p id="no-malone"><strong><tal:project_title replace="context/title" /> does not use Launchpad for | ||
438 | 152 | bug tracking.</strong></p> | ||
439 | 153 | |||
440 | 154 | <p id="no-malone-edit"><a href="+edit">Enable bug tracking.</a></p> | ||
441 | 155 | </tal:not_uses_malone> | ||
442 | 136 | 156 | ||
443 | 137 | </div><!-- main --> | 157 | </div><!-- main --> |
444 | 138 | </body> | 158 | </body> |
= Summary =
This branch started as a fix for Bug #439245, hot bugs listed on project
bugs home when the project doesn't use Launchpad, and in the process we
decided to fix Bug #174473, project home page has search form even when
there are no bugs.
== Proposed fix ==
The fix for the first bug is to check for launchpad_ bugtracker, and if this is the case, show the bugs
view/uses_
home page as it currently is on lp.net. If not, we don't show anything
on the home page and add a note that the project does not use Launchpad
for bug tracking. There is also a link provided to edit the project
details and change to use Launchpad if desired.
The fix for the second bug is to check view/hot_bugtasks as a condition
for showing the search form. If there are no hot_bugtasks, there are no
bugs filed against the project.
== Pre-implementation notes ==
This branch was done with me and Brian Fromme pairing at the bug heat
sprint, and we consulted Tom, Graham, and Gavin as needed.
== Implementation details ==
There were several broken tests to fix. In some cases, we removed the Factory.
failing sections of a test because the workflow was no longer supported.
In other cases, we updated the test to update data or use
LaunchpadObject
== Tests ==
Updated tests to run include:
./bin/test -cvvt xx-advanced- upstream- pending- bugwatch. txt bug-series. txt bugs-page. txt bug-contacts
./bin/test -cvvt xx-portlets-
./bin/test -cvvt xx-product-
./bin/test -cvvt initial-
We added a test to cover new functionality:
./bin/test -cvvt xx-front- page-info. txt
== Demo and Q/A ==
To demo, create a project and confirm that the bugs home page, i.e. /bugs.launchpad .dev/test- project/, does not list any of the
https:/
normal bugs info.
Then change the details to use malone and confirm that the page has bug
info listed.
Then, file bugs to confirm that a "Hot bugs" list appears.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: lp/bugs/ stories/ bugs/xx- front-page- info.txt
lib/
lib/lp/ bugs/stories/ bugtask- searches/ xx-advanced- upstream- pending- bugwatch. txt lp/bugs/ stories/ initial- bug-contacts/ 10-set- upstream- bugcontact. txt lp/bugs/ templates/ bugtarget- bugs.pt lp/bugs/ stories/ bugs/xx- portlets- bug-series. txt lp/bugs/ stories/ bugs/xx- product- bugs-page. txt
lib/
lib/
lib/
lib/