From e366b0b6d432512f1bcb09c6be3bfd5f09caaa79 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 8 Mar 2018 17:11:12 +0100 Subject: [PATCH] [FIX] project: make default task order more natural As of v11, project tasks and project issues have been merged. Issues used to be ordered by: priority desc, create_date desc whereas Tasks had the following historical ordering: priority desc, sequence, date_start, name, id (where `date_start` corresponds to the creation date of the task, or the time where task work began) After the merge, the Task order was kept, but it became difficult to understand for users, especially for converted issues. This commit modifies the default order to a more obvious common order: priority desc, sequence, id desc With the following goals in mind: - the ordering does not change without obvious actions of the user (starring a record moves it at the top, manually reordering records reorders them within the same "stars category), and creating new records adds them at the top, where they are visible - the ordering is easy to grasp, based on stars and chronological order, while still allowing manual reordering when really necessary (by default all records will have the default sequence of 10) - sorting by "id desc" is similar to the previous "create_date desc" but it can be sorted more efficiently by the database One could argue about sorting on chronological or reverse chronological order. Like blogs and timelines, everyone has their preferences. The latter option was selected because our UI for quickly adding records is at the top of the kanban view, so it is more natural to see new records at the top, instead of having them disappear at the bottom immediately. Hopefully this will not disrupt user workflows too much, and will remain intuitive enough. --- addons/project/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/project/models/project.py b/addons/project/models/project.py index 358348b92d7..6ba7b6b8c24 100644 --- a/addons/project/models/project.py +++ b/addons/project/models/project.py @@ -367,7 +367,7 @@ class Task(models.Model): _date_name = "date_start" _inherit = ['mail.thread', 'mail.activity.mixin', 'portal.mixin'] _mail_post_access = 'read' - _order = "priority desc, sequence, date_start, name, id" + _order = "priority desc, sequence, id desc" def _get_default_partner(self): if 'default_project_id' in self.env.context: