Feature #5038
closedDocument Sorting
0%
Description
It would be nice if there were some options for sorting documents. It appears that documents are listed in the order in which they are added. It would also be nice to sort the documents alphabetically.
Files
Updated by Jan F Westerkamp about 14 years ago
Is this still active?
The same request came from my users at the university.
In the 1.0-stable branch r4450 you can sort documents by title, date etc.
but if you had files e.g
"101115 printout" uploaded November 29th and
"101105 printout" uploaded on the same day but 3 minutes later
you get the order shown above if you sort by title even though you would expect it to be the other way around.
Updated by Zee Prime over 13 years ago
- Status changed from New to Resolved
Index: documents_controller.rb
===================================================================
--- documents_controller.rb
+++ documents_controller.rb
@@ -27,7 +27,7 @@
def index
@sort_by = %w(category date title author).include?(params[:sort_by]) ? params[:sort_by] : 'category'
- documents = @project.documents.find :all, :include => [:attachments, :category]
+ documents = @project.documents.find :all, :include => [:attachments, :category], :order => 'title ASC'
case @sort_by
when 'date'
@grouped = documents.group_by {|d| d.updated_on.to_date }
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
Closing this, status is resolved since 400 days and more (issue was last updated more than 400 days ago)...
Updated by Jan Niggemann (redmine.org team member) almost 12 years ago
- Status changed from Resolved to Closed
Updated by Art Rodriguez almost 12 years ago
- File doc_sort_options.png doc_sort_options.png added
- File doc_sort_error.png doc_sort_error.png added
Document sort on title only appears to be sorting on the first letter of the title, not the entire title.