Open Bug 412514 Opened 17 years ago Updated 2 years ago

Custom sort order in Tasks list

Categories

(Calendar :: Tasks, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: kumaran, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Thunderbird version 2.0.0.6 (20070728)

It would be very useful to allow for a user-defined column sort order in the tasks list.  The sort order of the table would therefore be the clicked column, followed by the given order of columns in the configuration.

Initially, this could just be an about:config setting with later expansion to a configuration dialog box.

For example:

user_pref("calendar.tasks.sort", "Due,Calendar Name,Category,Location,Title");


Reproducible: Always
What Lightning version do you tested with? Sorting is already possible in Lightning 0.8pre. Just click the column header to sort the tasks.
Clicking on the column header also works in Lightning 0.7.  The missing link is a default sorting mechanism.

Here is a concrete example:

Title                     Due           Category
Pick up dry cleaning      01/16/2008    Home
Write report              01/17/2008    Work
Pay bills                 01/16/2008    Home
Write software            01/17/2008    Work

Currently, if you click on "Due", it will sort by due date.  However, the other fields will be in arbitrary order since the sorting algorithm does not lexically order them.  In other words, there is no guarantee that Home will come before Work within a particular due date.

In my proposed scheme, clicking on "Due" would sort by the due date, with the rest of the columns sorted by the default order specified by the user.  That way, you can guarantee that the list appears in a reasonable manner.

Please note that it is not a reasonable interface to sort in the order that the columns were clicked.  For example, this is how Bugzilla sorts columns.  The downside of this approach is that whenever a column is clicked, the background default sort order is altered, making it hard to quickly sort and restore.

This change should be relatively straightforward, since it only involves updating the sort comparison function within the component that performs the sort.  The upside is that it will greatly enhance the usability of the task list.
Attached patch Custom sort order patch — — Splinter Review
This patch provides the functionality described in the comments.
The files reside inside of JAR files in the installed extension.
Kumaran, please request review from a module owner for your patches, see http://wiki.mozilla.org/Calendar:Module_Ownership

My suggestion would be to dynamically remember the last sort order options. i.e if you click to sort by category, then click to sort by due date, then the events will be sorted first by due date then by category. This way you don't need any pref options, and I believe I have seen such a sorting mechanism with other mozilla apps.

This may result in performance issues though, you might want to profile the sort functions prior to using my suggestion.
Thanks for your response.  I will request a review.

To address your suggestion, I discussed the dynamic approach in comment #2 above.  Bugzilla uses this scheme.  In my opinion, it is not user-friendly, since a common use case is to temporarily sort by another column to find an item, then switch back to the default sort.  For example, one might want to sort by task name, then go back to sorting by due date.  If the sort order keeps changing dynamically, it becomes cumbersome to restore the default view.

With approach implemented in the patch, the default sort order is always preserved for the user.  I am using this scheme for my task list currently and it makes for very quick access to information while keeping the list in a predictable order.  I would encourage folks to try the patch and provide feedback on how well it works for them.
Attachment #297509 - Flags: review?(christian.jansen)
OS: Linux → All
Hardware: PC → All
Assignee: nobody → kumaran
Comment on attachment 297509 [details] [diff] [review]
Custom sort order patch

I think this patch also needs ui-review.
Attachment #297509 - Flags: review?(christian.jansen) → ui-review?(christian.jansen)
Comment on attachment 297509 [details] [diff] [review]
Custom sort order patch

ui+ = Christian. Thanks for the patch and sorry for my late response.
Attachment #297509 - Flags: ui-review?(christian.jansen) → ui-review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Assignee: kumaran → nobody
Status: ASSIGNED → NEW
Summary: [RFE] Custom sort order in Tasks list → Custom sort order in Tasks list
@Fallen,  can we revive this?
Surely, if someone is willing to pick up the patch? Although this patch has ui-r+, I'm not sure if its sufficient. If more the list is sorted by more than one column, then this needs to be shown in the header somehow. There should probably also be a way to reset the ordering.

While this is useful for the power user, we need to make sure its not frustrating for the beginner user.
I have a patch that takes care of this in another bug, but there is still some ui work to do - I'll try to get it finshed up when time permits.
Assignee: nobody → matthew.mecca
@Philipp: is bug 440462 really a duplicate of this one ?
It's ability to reorder tasks by using drag & drop VS custom sort by using columns
So I'm not seeing work on this bug to fix bug 440462; maybe it's better to keep them separate ?


@Matthew: any news on your work on the patch ?
If this bug is a partial fix that is fine, we can then file a followup to fix remaining issues.
Assignee: matthew.mecca → nobody
Component: Lightning Only → Tasks
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: