Merge lp:~deryck/launchpad/sort-by-heat-as-default-77701 into lp:launchpad/db-devel

Proposed by Deryck Hodge
Status: Rejected
Rejected by: Deryck Hodge
Proposed branch: lp:~deryck/launchpad/sort-by-heat-as-default-77701
Merge into: lp:launchpad/db-devel
Diff against target: 260 lines (+47/-54)
7 files modified
lib/lp/bugs/browser/bugtask.py (+1/-1)
lib/lp/bugs/browser/tests/bugtask-search-views.txt (+7/-7)
lib/lp/bugs/stories/bugs/xx-front-page-search.txt (+7/-14)
lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt (+1/-1)
lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt (+14/-14)
lib/lp/bugs/stories/bugtask-searches/xx-sort-orders.txt (+12/-12)
lib/lp/bugs/templates/bugtarget-macros-search.pt (+5/-5)
To merge this branch: bzr merge lp:~deryck/launchpad/sort-by-heat-as-default-77701
Reviewer Review Type Date Requested Status
Graham Binns (community) Approve
Review via email: mp+17919@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Deryck Hodge (deryck) wrote :

This branch changes the default sort on bug listings to be heat
descending rather than importance descending. As a consequence of the
change, it fixes bug 77701. Affected tests have been updated and
default sort is well tested.

Cheers,
deryck

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/bugs/templates/bugtarget-macros-search.pt
  lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt
  lib/lp/bugs/stories/bugs/xx-front-page-search.txt
  lib/lp/bugs/browser/bugtask.py
  lib/lp/bugs/stories/bugtask-searches/xx-sort-orders.txt
  lib/lp/bugs/browser/tests/bugtask-search-views.txt
  lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt

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

I'm happy for this to land (though apparently Martin isn't, so that could be moot).

review: Approve
Revision history for this message
Deryck Hodge (deryck) wrote :

I'll hold on to the branch since it's complete and do a more extensive UI discussion and review with Martin A. next week to determine if we want to go forward with this approach.

Unmerged revisions

8919. By Deryck Hodge

Fix broken tests.

8918. By Deryck Hodge

Change the search input ordering to default to bug heat.

8917. By Deryck Hodge

Change default sort order from -importance to -heat.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/browser/bugtask.py'
--- lib/lp/bugs/browser/bugtask.py 2010-01-19 20:21:55 +0000
+++ lib/lp/bugs/browser/bugtask.py 2010-01-22 20:25:23 +0000
@@ -293,7 +293,7 @@
293 return order_by293 return order_by
294 else:294 else:
295 # No sort ordering specified, so use a reasonable default.295 # No sort ordering specified, so use a reasonable default.
296 return ["-importance"]296 return ['-heat']
297297
298298
299def get_default_search_params(user):299def get_default_search_params(user):
300300
=== modified file 'lib/lp/bugs/browser/tests/bugtask-search-views.txt'
--- lib/lp/bugs/browser/tests/bugtask-search-views.txt 2009-11-27 14:34:31 +0000
+++ lib/lp/bugs/browser/tests/bugtask-search-views.txt 2010-01-22 20:25:23 +0000
@@ -35,9 +35,9 @@
35 >>> open_bugtasks = list(distro_search_listingview.search().batch)35 >>> open_bugtasks = list(distro_search_listingview.search().batch)
36 >>> [(bugtask.bug.id, bugtask.status.name, bugtask.importance.name)36 >>> [(bugtask.bug.id, bugtask.status.name, bugtask.importance.name)
37 ... for bugtask in open_bugtasks]37 ... for bugtask in open_bugtasks]
38 [(3, 'NEW', 'UNKNOWN'),38 [(1, 'CONFIRMED', 'LOW'),
39 (1, 'CONFIRMED', 'LOW'),39 (2, 'CONFIRMED', 'LOW'),
40 (2, 'CONFIRMED', 'LOW')]40 (3, 'NEW', 'UNKNOWN')]
4141
42And the advanced form allows us to query for specific bug statuses.42And the advanced form allows us to query for specific bug statuses.
4343
@@ -301,10 +301,10 @@
301 >>> open_bugtasks = list(mozilla_search_listingview.search().batch)301 >>> open_bugtasks = list(mozilla_search_listingview.search().batch)
302 >>> for bugtask in open_bugtasks:302 >>> for bugtask in open_bugtasks:
303 ... print bugtask.bug.id, bugtask.product.name, bugtask.status.name303 ... print bugtask.bug.id, bugtask.product.name, bugtask.status.name
304 1 firefox NEW
305 4 firefox NEW
306 5 firefox NEW
304 15 thunderbird NEW307 15 thunderbird NEW
305 5 firefox NEW
306 4 firefox NEW
307 1 firefox NEW
308308
309And now we'll change the status of one of the bugtasks (we are still309And now we'll change the status of one of the bugtasks (we are still
310logged in from earlier):310logged in from earlier):
@@ -327,7 +327,7 @@
327 >>> invalid_bugtasks = list(mozilla_search_listingview.search().batch)327 >>> invalid_bugtasks = list(mozilla_search_listingview.search().batch)
328 >>> for bugtask in invalid_bugtasks:328 >>> for bugtask in invalid_bugtasks:
329 ... print bugtask.bug.id, bugtask.product.name, bugtask.status.name329 ... print bugtask.bug.id, bugtask.product.name, bugtask.status.name
330 15 thunderbird INVALID330 1 firefox INVALID
331331
332 >>> open_bugtasks[0].transitionToStatus(332 >>> open_bugtasks[0].transitionToStatus(
333 ... previous_status, getUtility(ILaunchBag).user)333 ... previous_status, getUtility(ILaunchBag).user)
334334
=== modified file 'lib/lp/bugs/stories/bugs/xx-front-page-search.txt'
--- lib/lp/bugs/stories/bugs/xx-front-page-search.txt 2009-09-23 13:26:26 +0000
+++ lib/lp/bugs/stories/bugs/xx-front-page-search.txt 2010-01-22 20:25:23 +0000
@@ -28,20 +28,13 @@
28 >>> print anon_browser.title28 >>> print anon_browser.title
29 Search29 Search
30 >>> print_bugtasks(anon_browser.contents)30 >>> print_bugtasks(anon_browser.contents)
31 3 Bug Title Test31 3 Bug Title Test mozilla-firefox (Debian) Unknown New
32 mozilla-firefox (Debian) Unknown New32 3 Bug Title Test mozilla-firefox (Debian Woody) Medium New
33 15 Nonsensical bugs are useless33 3 Bug Title Test mozilla-firefox (Debian Sarge) Medium New
34 Mozilla Thunderbird Unknown New34 7 A test bug Evolution Medium New
35 3 Bug Title Test35 10 another test bug linux-source-2.6.15 (Ubuntu) Medium New
36 mozilla-firefox (Debian Woody) Medium New36 15 Nonsensical bugs are useless Redfish Undecided New
37 3 Bug Title Test37 15 Nonsensical bugs are useless Mozilla Thunderbird Unknown New
38 mozilla-firefox (Debian Sarge) Medium New
39 7 A test bug
40 Evolution Medium New
41 10 another test bug
42 linux-source-2.6.15 (Ubuntu) Medium New
43 15 Nonsensical bugs are useless
44 Redfish Undecided New
4538
46Even if a product is specified in the bug target widget, all bug reports39Even if a product is specified in the bug target widget, all bug reports
47will be searched.40will be searched.
4841
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt 2009-09-09 23:16:08 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-advanced-people-filters.txt 2010-01-22 20:25:23 +0000
@@ -70,8 +70,8 @@
70 >>> anon_browser.getControl(name='field.bug_reporter').value = 'name12'70 >>> anon_browser.getControl(name='field.bug_reporter').value = 'name12'
71 >>> anon_browser.getControl('Search', index=0).click()71 >>> anon_browser.getControl('Search', index=0).click()
72 >>> print_bugtasks(anon_browser.contents)72 >>> print_bugtasks(anon_browser.contents)
73 2 Blackhole Trash folder mozilla-firefox (Debian) Low Confirmed
73 5 Firefox install instructions should be complete Mozilla Firefox Critical New74 5 Firefox install instructions should be complete Mozilla Firefox Critical New
74 2 Blackhole Trash folder mozilla-firefox (Debian) Low Confirmed
7575
76and invalid searches don't OOPS:76and invalid searches don't OOPS:
7777
7878
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt 2010-01-19 20:45:38 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-listing-basics.txt 2010-01-22 20:25:23 +0000
@@ -7,18 +7,18 @@
7 >>> from lp.bugs.tests.bug import print_bugtasks7 >>> from lp.bugs.tests.bug import print_bugtasks
8 >>> user_browser.open("http://launchpad.dev/mozilla/+bugs")8 >>> user_browser.open("http://launchpad.dev/mozilla/+bugs")
9 >>> print_bugtasks(user_browser.contents)9 >>> print_bugtasks(user_browser.contents)
10 1 Firefox does not support SVG firefox Low New
11 4 Reflow problems with complex page layouts firefox Medium New
12 5 Firefox install instructions should be complete firefox Critical New
10 15 Nonsensical bugs are useless thunderbird Unknown New13 15 Nonsensical bugs are useless thunderbird Unknown New
11 5 Firefox install instructions should be complete firefox Critical New
12 4 Reflow problems with complex page layouts firefox Medium New
13 1 Firefox does not support SVG firefox Low New
1414
15Bug listings default to open bugtasks:15Bug listings default to open bugtasks:
1616
17 >>> user_browser.open('http://launchpad.dev/debian/+bugs')17 >>> user_browser.open('http://launchpad.dev/debian/+bugs')
18 >>> print_bugtasks(user_browser.contents)18 >>> print_bugtasks(user_browser.contents)
19 1 Firefox does not support SVG mozilla-firefox Low Confirmed
20 2 Blackhole Trash folder mozilla-firefox Low Confirmed
19 3 Bug Title Test mozilla-firefox Unknown New21 3 Bug Title Test mozilla-firefox Unknown New
20 1 Firefox does not support SVG mozilla-firefox Low Confirmed
21 2 Blackhole Trash folder mozilla-firefox Low Confirmed
2222
23But you can make it show fixed ones to:23But you can make it show fixed ones to:
2424
@@ -48,9 +48,9 @@
4848
49 >>> user_browser.open("http://launchpad.dev/firefox/+bugs")49 >>> user_browser.open("http://launchpad.dev/firefox/+bugs")
50 >>> print_bugtasks(user_browser.contents)50 >>> print_bugtasks(user_browser.contents)
51 1 Firefox does not support SVG Low New
52 4 Reflow problems with complex page layouts Medium New
51 5 Firefox install instructions should be complete Critical New53 5 Firefox install instructions should be complete Critical New
52 4 Reflow problems with complex page layouts Medium New
53 1 Firefox does not support SVG Low New
5454
55View the distribution bug listing as Foo Bar, who's a maintainer.55View the distribution bug listing as Foo Bar, who's a maintainer.
5656
@@ -74,10 +74,10 @@
7474
75 >>> anon_browser.open("""http://launchpad.dev/firefox/+bugs?field.searchtext=&field.status%3Alist=New&field.status%3Alist=Confirmed&field.status-empty-marker=1&field.importance-empty-marker=1&field.assignee=&field.unassigned.used=&field.omit_dupes=&field.milestone-empty-marker=1&search=Search""")75 >>> anon_browser.open("""http://launchpad.dev/firefox/+bugs?field.searchtext=&field.status%3Alist=New&field.status%3Alist=Confirmed&field.status-empty-marker=1&field.importance-empty-marker=1&field.assignee=&field.unassigned.used=&field.omit_dupes=&field.milestone-empty-marker=1&search=Search""")
76 >>> print_bugtasks(anon_browser.contents)76 >>> print_bugtasks(anon_browser.contents)
77 1 Firefox does not support SVG Low New
78 4 Reflow problems with complex page layouts Medium New
77 5 Firefox install instructions should be complete Critical New79 5 Firefox install instructions should be complete Critical New
78 6 Firefox crashes when Save As dialog for a nonexistent window is closed High New80 6 Firefox crashes when Save As dialog for a nonexistent window is closed High New
79 4 Reflow problems with complex page layouts Medium New
80 1 Firefox does not support SVG Low New
8181
8282
83== Critical bugs ==83== Critical bugs ==
@@ -164,8 +164,8 @@
164164
165 >>> user_browser.open("http://launchpad.dev/firefox/+bugs?field.searchtext=install&search=Search&advanced=&milestone=1&status=10&status=20&assignee=all")165 >>> user_browser.open("http://launchpad.dev/firefox/+bugs?field.searchtext=install&search=Search&advanced=&milestone=1&status=10&status=20&assignee=all")
166 >>> print_bugtasks(user_browser.contents)166 >>> print_bugtasks(user_browser.contents)
167 1 Firefox does not support SVG Low New
167 5 Firefox install instructions should be complete Critical New168 5 Firefox install instructions should be complete Critical New
168 1 Firefox does not support SVG Low New
169169
170If we search for something and get no matches, it'll say so in a meaningful way170If we search for something and get no matches, it'll say so in a meaningful way
171instead of displaying an empty table.171instead of displaying an empty table.
@@ -206,12 +206,12 @@
206206
207 >>> browser.open('http://bugs.launchpad.dev/firefox/+bugs')207 >>> browser.open('http://bugs.launchpad.dev/firefox/+bugs')
208 >>> names_and_branches(browser.contents)208 >>> names_and_branches(browser.contents)
209 /firefox/+bug/5
210 Badge: branch
211 /firefox/+bug/4
212 Badge: branch
213 /firefox/+bug/1209 /firefox/+bug/1
214 Badge: blueprint210 Badge: blueprint
211 /firefox/+bug/4
212 Badge: branch
213 /firefox/+bug/5
214 Badge: branch
215215
216Milestones are also presented as badges on bugs, and linked to the216Milestones are also presented as badges on bugs, and linked to the
217relevant listings:217relevant listings:
218218
=== modified file 'lib/lp/bugs/stories/bugtask-searches/xx-sort-orders.txt'
--- lib/lp/bugs/stories/bugtask-searches/xx-sort-orders.txt 2009-06-12 16:36:02 +0000
+++ lib/lp/bugs/stories/bugtask-searches/xx-sort-orders.txt 2010-01-22 20:25:23 +0000
@@ -9,12 +9,12 @@
99
10 >>> from lp.bugs.tests.bug import print_bugtasks10 >>> from lp.bugs.tests.bug import print_bugtasks
11 >>> print_bugtasks(anon_browser.contents)11 >>> print_bugtasks(anon_browser.contents)
12 1 Firefox does not support SVG
13 Low New
14 4 Reflow problems with complex page layouts
15 Medium New
12 5 Firefox install instructions should be complete16 5 Firefox install instructions should be complete
13 Critical New17 Critical New
14 4 Reflow problems with complex page layouts
15 Medium New
16 1 Firefox does not support SVG
17 Low New
1818
19Newest:19Newest:
2020
@@ -35,12 +35,12 @@
3535
36 >>> anon_browser.open("http://launchpad.dev/debian/+bugs")36 >>> anon_browser.open("http://launchpad.dev/debian/+bugs")
37 >>> print_bugtasks(anon_browser.contents)37 >>> print_bugtasks(anon_browser.contents)
38 1 Firefox does not support SVG
39 mozilla-firefox Low Confirmed
40 2 Blackhole Trash folder
41 mozilla-firefox Low Confirmed
38 3 Bug Title Test42 3 Bug Title Test
39 mozilla-firefox Unknown New43 mozilla-firefox Unknown New
40 1 Firefox does not support SVG
41 mozilla-firefox Low Confirmed
42 2 Blackhole Trash folder
43 mozilla-firefox Low Confirmed
4444
45By most recently changed:45By most recently changed:
4646
@@ -111,12 +111,12 @@
111 >>> anon_browser.open(111 >>> anon_browser.open(
112 ... "http://launchpad.dev/debian/+source/mozilla-firefox/+bugs")112 ... "http://launchpad.dev/debian/+source/mozilla-firefox/+bugs")
113 >>> print_bugtasks(anon_browser.contents)113 >>> print_bugtasks(anon_browser.contents)
114 1 Firefox does not support SVG
115 Low Confirmed
116 2 Blackhole Trash folder
117 Low Confirmed
114 3 Bug Title Test118 3 Bug Title Test
115 Unknown New119 Unknown New
116 1 Firefox does not support SVG
117 Low Confirmed
118 2 Blackhole Trash folder
119 Low Confirmed
120120
121Sort by importance:121Sort by importance:
122122
123123
=== modified file 'lib/lp/bugs/templates/bugtarget-macros-search.pt'
--- lib/lp/bugs/templates/bugtarget-macros-search.pt 2010-01-19 22:34:00 +0000
+++ lib/lp/bugs/templates/bugtarget-macros-search.pt 2010-01-22 20:25:23 +0000
@@ -9,7 +9,11 @@
9 method.9 method.
10 </tal:comment>10 </tal:comment>
11 <select name="orderby" id="orderby" size="1"11 <select name="orderby" id="orderby" size="1"
12 tal:define="orderby request/orderby|string:-importance">12 tal:define="orderby request/orderby|string:-heat">
13 <option
14 value="-heat"
15 tal:attributes="selected python:orderby == '-heat'"
16 >by bug heat</option>
13 <option17 <option
14 value="-importance"18 value="-importance"
15 tal:attributes="selected python:orderby == '-importance'"19 tal:attributes="selected python:orderby == '-importance'"
@@ -55,10 +59,6 @@
55 value="-users_affected_count"59 value="-users_affected_count"
56 tal:attributes="selected python:orderby == '-users_affected_count'"60 tal:attributes="selected python:orderby == '-users_affected_count'"
57 >by number of users affected</option>61 >by number of users affected</option>
58 <option
59 value="-heat"
60 tal:attributes="selected python:orderby == '-heat'"
61 >by bug heat</option>
62 </select>62 </select>
63</metal:block>63</metal:block>
6464

Subscribers

People subscribed via source and target branches

to status/vote changes: