[Ml-yokadi] Priorities in ical export

Sébastien Renard Sebastien.Renard at digitalfox.org
Sat Mar 20 14:52:31 CET 2010


Le jeudi 18 mars 2010 21:07:51, David Faure a écrit :
> So, the bug I thought I fixed at linux expo (priorities wrongly sorted
> in korganizer) was actually not a korganizer bug, but a bug in the
> akonadi ical export:
> smaller numbers are supposed to be higher priority, in ical...

Arg.

> Sergio Martins told me:
> "in korganizer, the highest priority is 1, and the lowest is 9"
> and to give you this reference:
>  http://www.ietf.org/rfc/rfc2445.txt -> 4.8.1.9 Priority
> 
> I'll revert my korganizer change.
> 
> I'm not sure what this means exactly for the yokadi ical export;
> exporting 100-priority would be quite confusing (one wouldn't recognize the
> priorities set in yokadi), but then again, exporting "-priority" might be
> confusing too (negative numbers).

Actually, yokadi lowest is -99 and highest is 100. Default is 0.

We could use the following algo : 
icalPriority = - (yokadiPriority - 100) / 20
if icalPriority > 9 : icalPriority = 9
if icalPriority < 1 : icalPriority = 1

The drawback if that a task modified in an ical too would have his priority 
rounded (0, 20, 40, 60, 80) and maximised at 80.
I don't known if this is a major issue...

Here's some examples : 
Yok   Ical
-99	9
-80	9
-60	8
-40	7
-20	6
0	5
20	4
40	3
60	2
80	1
100	1


Comments ?
-- 
Sébastien


More information about the Ml-yokadi mailing list