Patch #29406
closedUse sorted instead of sort
Description
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.
Files
Updated by Pavel Rosický over 6 years ago
Updated by Go MAEDA almost 6 years ago
- Target version set to Candidate for next major release
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.
Updated by Pavel Rosický almost 6 years ago
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
Updated by Go MAEDA almost 6 years ago
- File fix-29406.diff fix-29406.diff added
- Category changed from Code cleanup/refactoring to Performance
- Target version changed from Candidate for next major release to 4.1.0
Passed all tests. Setting the target version to 4.1.0.
The attached patch is a combination of Pavel Rosický's three patches.
Updated by Go MAEDA almost 6 years ago
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Target version changed from 4.1.0 to 4.0.0
Committed. Thank you for improving Redmine.
Updated by Go MAEDA almost 6 years ago
- Subject changed from use sorted instead of sort to Use sorted instead of sort