Merge lp:~gmb/launchpad/stable-unfark into lp:launchpad

Proposed by Graham Binns
Status: Merged
Approved by: Jonathan Lange
Approved revision: no longer in the source branch.
Merged at revision: 11689
Proposed branch: lp:~gmb/launchpad/stable-unfark
Merge into: lp:launchpad
Diff against target: 30 lines (+8/-2)
2 files modified
lib/lp/registry/browser/person.py (+7/-1)
lib/lp/registry/stories/person/xx-person-subscriptions.txt (+1/-1)
To merge this branch: bzr merge lp:~gmb/launchpad/stable-unfark
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Launchpad code reviewers code Pending
Review via email: mp+37860@code.launchpad.net

Commit message

An ordering issue in Person:+subscriptions has been fixed.

Description of the change

This branch fixes one of the current test failures in stable by fixing an ordering issue in the Person:+subscriptions page.

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

Hey Graham,

Thanks for fixing this. If it were new code I'd hesitate to approve it – it looks like it's doing too many queries. As it is, I'm happy for this to land now.

jml

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/person.py'
2--- lib/lp/registry/browser/person.py 2010-10-04 20:46:55 +0000
3+++ lib/lp/registry/browser/person.py 2010-10-07 15:13:43 +0000
4@@ -2368,7 +2368,13 @@
5
6 for task in bug_tasks:
7 if task.bug not in sub_bugs:
8- sub_bug_tasks.append(task)
9+ # We order the bugtasks by date_last_updated but we
10+ # always display the default task for the bug. This is
11+ # to avoid ordering issues in tests and also prevents
12+ # user confusion (because nothing is more confusing than
13+ # your subscription targets changing seemingly at
14+ # random).
15+ sub_bug_tasks.append(task.bug.default_bugtask)
16 sub_bugs.append(task.bug)
17 return BatchNavigator(sub_bug_tasks, self.request)
18
19
20=== modified file 'lib/lp/registry/stories/person/xx-person-subscriptions.txt'
21--- lib/lp/registry/stories/person/xx-person-subscriptions.txt 2010-10-05 16:17:07 +0000
22+++ lib/lp/registry/stories/person/xx-person-subscriptions.txt 2010-10-07 15:13:43 +0000
23@@ -110,7 +110,7 @@
24 In
25 1
26 Firefox does not support SVG
27- mozilla-firefox (Ubuntu)
28+ Mozilla Firefox
29
30 Sample Person now chooses to unsubscribe HWDB team from bug 1.
31