[rt-devel] iCalendar files?

Jesse Vincent jesse at bestpractical.com
Wed Feb 19 17:45:25 EST 2003


I've done it, in an attempt to load it into apple's iCal.  iCal.app just
isn't up to it yet. Below, is the code I was using, as a mason template:


BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
%while (my $ticket = $tix->Next) {
% my $transactions = $ticket->Transactions;
% while (my $trans = $transactions->Next) {
% my $start = Date::ICal->new( epoch => $ticket->CreatedObj->Unix);
% my $end = Date::ICal->new( epoch => ($ticket->CreatedObj->Unix+ '600'));
BEGIN:VEVENT
SUMMARY:#<%$ticket->Id%>: <%$trans->Description%> (<%$ticket->Subject%>)
DTSTART;VALUE=DATE-TIME:<% $start->ical%>
DTEND;VALUE=DATE-TIME:<% $end->ical %>
END:VEVENT
% }}
END:VCALENDAR
%$m->abort();
<%init>
$r->content_type('text/plain');

use Date::ICal;
my $tix = RT::Tickets->new($RT::SystemUser);
my $month_ago = RT::Date->new($RT::SystemUser);
$month_ago->Set( Format => 'Unix', Value => (time-(86400*30)));

$tix->Limit(FIELD => 'Created', OPERATOR => '>', VALUE => $month_ago->ISO);
</%init>

On Wed, Feb 19, 2003 at 02:09:14PM -0500, kellan at protest.net wrote:
> I was thinking of doing the requisite hacking to get RT to generate iCal
> files, either for a queue, or for a user.
> 
> I just wanted to check if anyone has done similiar work already, or has
> any suggestions.
> 
> thanks
> kellan
> 
> -- 
> "the truth is always revolutionary" [antonio gramsci]
> 
> kellan at protest.net
> _______________________________________________
> rt-devel mailing list
> rt-devel at lists.fsck.com
> http://lists.fsck.com/mailman/listinfo/rt-devel

-- 
http://www.bestpractical.com/rt  -- Trouble Ticketing. Free.



More information about the Rt-devel mailing list