Vote #79471
完了Use sorted instead of sort
0%
説明
using an order statement should be more effective because records are sorted in the database.
issue priorities on the issue's report page were originaly sorted by id (desc), but I think they should be sorted by position.
journals
--------------------------------------------------------------------------------
Pavel Rosický wrote:
> issue priorities on the issue's report page were originaly sorted by id (desc), but I think they should be sorted by position.
I prefer the current sort order. Showing the highest priority first is reasonable.
--------------------------------------------------------------------------------
> issue priorities on the issue's report page were originaly sorted by id
forget about this statement. I was wrong, enumerations have a default scope, so it's already sorted and I changed the order. I reverted this change and attached a fixed version of reports_controller_patch.rb
see also related #25867 for differences between sort vs sorted, it doesn't behave the same way
--------------------------------------------------------------------------------
Passed all tests. Setting the target version to 4.1.0.
The attached patch is a combination of Pavel Rosický's three patches.
--------------------------------------------------------------------------------
Committed. Thank you for improving Redmine.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------