ICS buglist template generating VEVENT based on bug deadline

Julien BETI julien.beti at free.fr
Tue Sep 5 14:59:12 UTC 2006


Basing my work on the existing list.ics.tmpl template which generate 
VTODO entries in the generated ICS, I'm trying to make a 
list.icsevent.tmpl which generate VEVENT entries, based on the deadline 
of the bug, keeping the TODO entries if deadline not set.
As I'm far from comfortable with Template Toolkit coding, I experience 
an error, and I do not understand the problem:

In standard list.ics.tmpl file (which works, of course :p):
[% BLOCK ics_dtstart %]
  [% date.format(bug.opentime,"%Y%m%dT%H%M%SZ") FILTER ics('DTSTART') %]
[% END %]

In my list.icsevent.tmpl file:
[% BLOCK ics_dtstart %]
  [% date.format(bug.deadline,"%Y%m%dT%H%M%SZ") FILTER ics('DTSTART') %]
[% END %]

It gives the following error:
date error - bad time/date string: expects 'h:m:s d:m:y' got: '2006-09-05'

 From my understanding, as the deadline is stored as a date in MySQL, I 
should have a date in bug.deadline, but obviously I don't. I will not 
list here all that I've tried as it may look like desperate tries :p

Is somebody can give me a clue on this, and how the "bug" object is 
built and initialized?



La route est longue, mais la voie est libre...

More information about the developers mailing list