Feature #5038

Document Sorting

Added by Max Abramowitz over 12 years ago. Updated over 9 years ago.

Status:ClosedStart date:2010-03-10
Priority:NormalDue date:
Assignee:-% Done:


Target version:-


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.

doc_sort_options.png (1.89 KB) Art Rodriguez, 2013-01-16 21:45

doc_sort_error.png (37 KB) Art Rodriguez, 2013-01-16 21:45


#1 Updated by Moritz Voss about 12 years ago


#2 Updated by Jan F Westerkamp over 11 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.

#3 Updated by Zee Prime almost 11 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 }

#4 Updated by Jan Niggemann (redmine.org team member) over 9 years ago

Closing this, status is resolved since 400 days and more (issue was last updated more than 400 days ago)...

#5 Updated by Jan Niggemann (redmine.org team member) over 9 years ago

  • Status changed from Resolved to Closed

#6 Updated by Art Rodriguez over 9 years ago

Document sort on title only appears to be sorting on the first letter of the title, not the entire title.

Also available in: Atom PDF