Merge pull request #2450 from aignatov-bio/ai-sci-4421-sorting-task-without-due-date

Add alphabetical order for tasks without due date [SCI-4421]
This commit is contained in:
aignatov-bio 2020-03-05 14:52:58 +01:00 committed by GitHub
commit 6f395b8e36
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,9 +29,9 @@ module Dashboard
case task_filters[:sort]
when 'date_desc'
tasks = tasks.order('my_modules.due_date': :desc)
tasks = tasks.order('my_modules.due_date': :desc).order('my_modules.name': :asc)
when 'date_asc'
tasks = tasks.order('my_modules.due_date': :asc)
tasks = tasks.order('my_modules.due_date': :asc).order('my_modules.name': :asc)
when 'atoz'
tasks = tasks.order('my_modules.name': :asc)
when 'ztoa'