Closed Bug 290631 Opened 20 years ago Closed 16 years ago

iCalendar export should include priority

Categories

(Bugzilla :: Query/Bug List, enhancement)

2.19.1
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 3.6

People

(Reporter: Biesinger, Assigned: bbaetz)

Details

(Whiteboard: [es-gnome])

Attachments

(1 file, 1 obsolete file)

Evolution does not show any priority for the exported bug list. but, the format
would allow specifying priorities:

http://www.kanzaki.com/docs/ical/priority.html
http://www.kanzaki.com/docs/ical/vtodo.html

seems like bugzilla's priorities could be nicely mapped onto it (say, to
1/3/5/7/9 for P1-P5)
Severity: normal → enhancement
Attached patch Patch (obsolete) — Splinter Review
The spec here mentions that the numbers are restricted to 1..9, not 1..n, so I've just truncated.
Assignee: query-and-buglist → bbaetz
Status: NEW → ASSIGNED
Attachment #375967 - Flags: review?(mkanat)
Comment on attachment 375967 [details] [diff] [review]
Patch

>Index: buglist.cgi

>+# The iCal file needs priorities ordered from 1..n
>+{
>+    my $n = 1;
>+    $vars->{'rev_priorities'} = {};
>+    my $priorities = get_legal_field_values('priority');
>+    foreach my $p (@$priorities) {
>+        $vars->{'rev_priorities'}->{$p} = $n;
>+        $n++;
>+    }
>+}

Looks good, but this block should be enclosed in

  if ($format->{'extension'} eq 'ics') {...}

as it's used nowhere else. Also, I suggest you write the |priority > 9| logic here as well instead of in the template:

  $vars->{'rev_priorities'}->{$p} = ($n > 9) ? 9 : $n++;
Attachment #375967 - Flags: review?(mkanat) → review-
Yeah. I wanted to do it entirely in the template, but none of the helper functions are exposed and it got too messy.
Attached patch v2Splinter Review
Yeah, this is cleaner.
Attachment #375967 - Attachment is obsolete: true
Attachment #375980 - Flags: review?(mkanat)
Summary: iCalendar export does not include priority → iCalendar export should include priority
Target Milestone: --- → Bugzilla 3.6
Attachment #375980 - Flags: review?(mkanat) → review+
Comment on attachment 375980 [details] [diff] [review]
v2

Looks good to me! :-)
Flags: approval+
OS: Linux → All
Hardware: x86 → All
Checked in:

Checking in buglist.cgi;
/cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v  <--  buglist.cgi
new revision: 1.396; previous revision: 1.395
done
Checking in template/en/default/list/list.ics.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/list/list.ics.tmpl,v  <--  list.ics.tmpl
new revision: 1.11; previous revision: 1.10
done
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Keywords: relnote
Whiteboard: [es-gnome]
Added to the release notes in bug 547466.
Keywords: relnote
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: