Last Comment Bug 357384 - Wrong sorting of Task priority
: Wrong sorting of Task priority
Status: RESOLVED FIXED
:
Product: Calendar
Classification: Client Software
Component: Tasks (show other bugs)
: Sunbird 0.3
: All All
: -- normal (vote)
: Sunbird 0.5
Assigned To: Matthew (lilmatt) Willis
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-20 03:36 PDT by David Tenser [:djst]
Modified: 2007-03-05 06:29 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
sort unspecified as medium (1.32 KB, patch)
2006-12-08 17:56 PST, Joey Minta
no flags Details | Diff | Splinter Review
sort no priority above high (2.73 KB, patch)
2007-02-26 07:27 PST, Matthew (lilmatt) Willis
no flags Details | Diff | Splinter Review
Less silly way of doing this (2.72 KB, patch)
2007-02-26 07:34 PST, Matthew (lilmatt) Willis
cmtalbert: first‑review+
dmose: second‑review+
dmose: ui‑review+
Details | Diff | Splinter Review

Description David Tenser [:djst] 2006-10-20 03:36:34 PDT
When sorting your tasks after the priority, this is the result:

1. High Priority items
2. Medium Priority items
3. Low Priority items
4. Unspecified priority items

This gives the impression that Low Priority items have higher priority than unspecified priority items. And why do we need "Unspecified" priority items anyway? That is just a confusing term. Either it has a "Normal" (Medium) priority, or it has higher or lower. New tasks should have Medium priority by default and Unspecified priority should be removed. 

If more granularity is needed, two new priority levels should be introduced: Top/Highest Priority and Lowest Priority.
Comment 1 Stefan Sitter 2006-10-21 11:15:34 PDT
Current realization tightly follows the iCalendar standard that defines the priority as an integer value in the range [0..9]. The values [1..4] maps to 'high', [5] maps to 'medium', [6..9] maps to 'low' and [0] maps to 'unspecified'. Therefore 'unspecified' needs to be supported.

During sort 'unspecified' is currently sort after all other priorities by purpose (Bug 266602).
Comment 2 David Tenser [:djst] 2006-10-21 14:38:41 PDT
> Current realization tightly follows the iCalendar standard that defines the
> priority as an integer value in the range [0..9]. The values [1..4] maps to
> 'high', [5] maps to 'medium', [6..9] maps to 'low' and [0] maps to
> 'unspecified'. Therefore 'unspecified' needs to be supported.

Then by all means support it. But don't place it _below_ low priority items, that just invalidates the Sort by Priority feature.

> 
> During sort 'unspecified' is currently sort after all other priorities by
> purpose (Bug 266602).

AFAIC, the spec doesn't say anything about how to _sort_ 'unspecified' tasks. There's no reason why they should be placed outside the specified priorities. The natural thing is to sort them as 'medium' priority. 

The whole point of sorting a task list by priority is to process tasks in the proper priority order. If the list then presents the lowest priority items _before_ the unspecified priorities, you will end up doing things your boss didn't think was important. 

'Unspecified' should be sorted as 'medium'. See also bug 266602 comment 6.
Comment 3 Joey Minta 2006-12-08 17:56:58 PST
Created attachment 248034 [details] [diff] [review]
sort unspecified as medium

Attaching a patch here to force this bug to either be fixed or WONTFIXed.  This makes tasks with unspecified priority sort as 'medium.'  I'm not sure whether it's the right idea from a user-experience point of view, but i'll leave that up to the ui-reviewers.
Comment 4 Michiel van Leeuwen (email: mvl+moz@) 2006-12-09 11:29:35 PST
Comment on attachment 248034 [details] [diff] [review]
sort unspecified as medium

Moving uirequest to dmose, since this is more a language issue.
Comment 5 Dan Mosedale (:dmose) 2007-02-01 14:30:14 PST
The workflow I typically use is to add todos quickly while I'm doing other work.  Typically, or at least frequently, I don't get around to assigning a priority to them at the time of creation.  So for me, "unspecified" typically means "untriaged".  And since priorities are generally relative to each other, this means that having untriaged priorities to some degree invalidates existing priorities.  So for my work pattern, at least, this would suggest sorting "unspecified" first, above high.  Comments?
Comment 6 Matthew (lilmatt) Willis 2007-02-02 13:21:37 PST
> this would suggest sorting "unspecified" first, above high.
+1

It would at least:
a) Keep them from being lost at the bottom and 
b) Force the user to deal with them if they didn't want them at the top.
Comment 7 Matthew (lilmatt) Willis 2007-02-26 07:27:42 PST
Created attachment 256462 [details] [diff] [review]
sort no priority above high

Per comment 5, sorts tasks with no priority _above_ high priority.
This all doesn't matter if we don't sort by priority by default, so I set that.
Comment 8 Matthew (lilmatt) Willis 2007-02-26 07:34:06 PST
Created attachment 256464 [details] [diff] [review]
Less silly way of doing this

Props to jminta for noticing I was being silly.
Comment 9 Simon Paquet [:sipaq] 2007-02-26 08:38:54 PST
Do we still need a 2nd review here? And why not push this over to the Sun guys. Their review queues are pretty empty atm.
Comment 10 cmtalbert 2007-02-26 09:04:47 PST
Comment on attachment 256464 [details] [diff] [review]
Less silly way of doing this

Looks good, tested on windows. My only issue is that there is no way for the user to really know how we are sorting these items. There is no UI indicating that the ! column is the one being sorted on.  But, that is a different issue, IMHO. Should that be a follow on bug? Or is that something we want to address when we "clean up tasks".
Comment 11 David Tenser [:djst] 2007-02-26 12:20:18 PST
(In reply to comment #10)
> (From update of attachment 256464 [details] [diff] [review])
> Looks good, tested on windows. My only issue is that there is no way for the
> user to really know how we are sorting these items. There is no UI indicating
> that the ! column is the one being sorted on.  But, that is a different issue,
> IMHO. Should that be a follow on bug? Or is that something we want to address
> when we "clean up tasks".
> 

I was just about to post the same thing. Someone should probably file a follow up bug to make the "!" column actually show the status. Perhaps an unspecified/untriaged task priority should use a questionmark "?".

On a related notice, clicking in the "!" column area of a task entry should pop-up a simple menu allowing you to set the priority. It is more intuitive than right-clicking and then selecting a sub-menu to change the priority.
Comment 12 Dan Mosedale (:dmose) 2007-02-27 13:40:57 PST
Comment on attachment 256464 [details] [diff] [review]
Less silly way of doing this

lilmatt: looks good; ui-r=dmose, r2=dmose.  As far as the other issues mentioned here, they're probably best served by separate bugs.
Comment 13 Matthew (lilmatt) Willis 2007-03-05 06:29:07 PST
Patch checked in on MOZILLA_1_8_BRANCH and trunk

-> FIXED

Note You need to log in before you can comment on or make changes to this bug.