Merge lp://qastaging/~jcsackett/launchpad/620494-downloads-sort into lp://qastaging/launchpad

Proposed by j.c.sackett
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: 11435
Proposed branch: lp://qastaging/~jcsackett/launchpad/620494-downloads-sort
Merge into: lp://qastaging/launchpad
Diff against target: 69 lines (+40/-1)
2 files modified
lib/lp/registry/model/product.py (+8/-1)
lib/lp/registry/tests/test_product.py (+32/-0)
To merge this branch: bzr merge lp://qastaging/~jcsackett/launchpad/620494-downloads-sort
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+33413@code.qastaging.launchpad.net

Commit message

Fixes sorting on plus download by adding milestone name as an additional sort parameter.

Description of the change

= Summary =

Fixes an edge case sorting releases on +download by adding an additional sort field. Per the bug, if too releases have the same date, they can be sorted wrong from the fallback to database id.

== Proposed fix ==

Add an additional sort by milestone.name; this catches the edge case and displays the releases correctly since most milestones use numeric names.

== Pre-implementation notes ==

Talked with Curtis.

== Implementation details ==

As in Proposed fix.

== Tests ==

bin/test -vvc -t getMilestonesAndReleases

== Demo and Q/A ==

On Thunderbird in dev (launchpad.dev/thunderbird) create two releases on trunk with milestones 0.99 and 0.98; make sure they have downloadable files. On http://launchpad.dev/thunderbird/+download you should see 0.99 listed before 0.98.

= Launchpad lint =
Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/registry/model/product.py
  lib/lp/registry/tests/test_product.py

To post a comment you must log in.
Revision history for this message
Aaron Bentley (abentley) :
review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

I think that someone is adding a database sort function for milestone
names anyhow; you should probably use that.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.