Merge lp://qastaging/~henninge/launchpad/bug-461756 into lp://qastaging/launchpad
Proposed by
Henning Eggers
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Данило Шеган | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | not available | ||||
Proposed branch: | lp://qastaging/~henninge/launchpad/bug-461756 | ||||
Merge into: | lp://qastaging/launchpad | ||||
Diff against target: |
159 lines 6 files modified
lib/lp/translations/browser/distroseries.py (+2/-1) lib/lp/translations/browser/productseries.py (+2/-1) lib/lp/translations/interfaces/potemplate.py (+2/-1) lib/lp/translations/model/potemplate.py (+10/-3) lib/lp/translations/stories/distroseries/xx-distroseries-templates.txt (+4/-4) lib/lp/translations/stories/productseries/xx-productseries-templates.txt (+16/-1) |
||||
To merge this branch: | bzr merge lp://qastaging/~henninge/launchpad/bug-461756 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Данило Шеган (community) | Approve | ||
Review via email: mp+14211@code.qastaging.launchpad.net |
To post a comment you must log in.
= Bug 461756 =
The template ordering on a productseries or distroseries +templates page
seemed to be rather arbitrary. In reality, they were ordered by database
ids, which is not very useful if you want to find a specific template on
the page.
This ordering is taken from the POTemplateSubset ordering where the
template are retrieved from the database.
== Proposed fix ==
Add an optional ordering flag to POTemplateSubset to apply an ordering
by names to the query. The view code can then set that flag.
Ordering will be by POTemplate.name for a productseries and by ame.name, POTemplate.name) for a distroseries.
(SourcePackageN
== Implementation details ==
The flag 'ordered_by_names' defaults to 'False' to retain the old
behaviour on which other code (and tests) might depend.
== Tests ==
bin/test -vvct distroseries- templates -t productseries- templates
== Demo and Q/A ==
(rev 8619 on staging or rev 9804 on edge for bug 461818 to be fixed.)
Go to this url and verify that the templates are listed alphabetically /translations. staging. launchpad. net/ubuntu/ karmic/ +templates
by the names of the source packages and the names of the templates.
https:/
Here is one for a product, should be ordered by the names of the templates: /translations. staging. launchpad. net/ocportal/ 4.2.0/+ templates
https:/
Note that the latter appears sorted, even without this fix, but that is
not true. Some templates are out of order. They were probably imported
in alphabetical order.
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: translations/ interfaces/ potemplate. py translations/ browser/ distroseries. py translations/ stories/ productseries/ xx-productserie s-templates. txt translations/ browser/ productseries. py translations/ model/potemplat e.py translations/ stories/ distroseries/ xx-distroseries -templates. txt
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
== Pylint notices ==
lib/lp/ translations/ interfaces/ potemplate. py
9: [F0401] Unable to import 'lazr.enum' (No module named enum)