#1988 closed defect (fixed)
Roadmap iCalendar not compatible with Outlook
Reported by: | Owned by: | Christopher Lenz | |
---|---|---|---|
Priority: | normal | Milestone: | 0.9 |
Component: | roadmap | Version: | 0.8 |
Severity: | normal | Keywords: | msoutlook ical |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Expected Results: Right click on the Trac Roadmap iCalendar link and save the file as roadmap.ics file. Outlook2003, File → Import and Export → Import from an iCalendar or vCalendar and select roadmap.ics from where you saved it. Expect it to import the calendar into Outlook.
Actual Results: In actuality you get an error: "vCalendar/iCalendar Import Failed. The input file may be corrupt."
Fix: I played around with the file format and compared it to what you get exporting a calendar file from outlook. From what I can tell to get the file to work in Outlook trac would have to include the following tags:
within each BEGIN:VEVENT and END:VEVENT tags a date time stamp: DTSTAMP:20050830T180757Z
before the first BEGIN:VEVENT tag: METHOD:PUBLISH
Anyhow i'll be glad to test any changes anyone makes just shoot me an email.
Attachments (0)
Change History (12)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Unfortunately Outlook doesn't support the VTODO (and VJOURNAL) type, but this is what Trac expects the calender to do. So, this is indeed a problem of Outlook's poor iCalender support.
comment:3 by , 19 years ago
I agree about the VTODO - it's unfortunate - yet It's also a side issue. As long as I can get the VEVENTS in I'm happy for now. And having VTODO's in there doesnt seem to be fouling up the import.
comment:4 by , 19 years ago
Import should work if there's at least one VEVENT in the calender, that's right. But if I open Edgewall's current roadmap.ics with a text editor I can't see any VEVENT in there, so I wonder what VEVENTs you're talking about. Sorry, I'm not really into Trac's iCalender/vCalender support.
comment:6 by , 19 years ago
Actually, the calendar built by Trac is correct according to the vCalendar (V1.0) specification. All you have to do is to change its version to 1.0:
-
trac/Roadmap.py
141 141 user = req.args.get('user', 'anonymous') 142 142 143 143 write_prop('BEGIN', 'VCALENDAR') 144 write_prop('VERSION', ' 2.0')144 write_prop('VERSION', '1.0') 145 145 write_prop('PRODID', '-//Edgewall Software//NONSGML Trac %s//EN' 146 146 % __version__) 147 147 write_prop('X-WR-CALNAME',
The other option is to change the generated calendar so that it complies with the iCalendar (V2.0) specification:
-
trac/Roadmap.py
144 144 write_prop('VERSION', '2.0') 145 145 write_prop('PRODID', '-//Edgewall Software//NONSGML Trac %s//EN' 146 146 % __version__) 147 write_prop('METHOD', 'PUBLISH') 147 148 write_prop('X-WR-CALNAME', 148 149 self.config.get('project', 'name') + ' - Roadmap') 149 150 for milestone in milestones: … … 152 153 if milestone.has_key('due'): 153 154 write_prop('BEGIN', 'VEVENT') 154 155 write_prop('UID', uid) 156 write_date('DTSTAMP', localtime(milestone['due'])) 155 157 write_date('DTSTART', localtime(milestone['due'])) 156 158 write_prop('SUMMARY', 'Milestone %s' % milestone['name']) 157 159 write_prop('URL', req.base_url + '/milestone/' +
The calendar generated by this code complies with the V2.0 specs and gets successfully imported by Outlook. However, it's still incorrect since the DTSTAMP
property should hold a date when the VEVENT
was created. Unfortunately there's no milestone column named created
in Trac's database where this information could be obtained.
Cf. http://www.imc.org/pdi/pdiproddev.html, http://www.ietf.org/rfc/rfc2445.txt
Ps: The poor vCalendar/iCalendar support by Outlook (unsupported VTODO
property) remains, of course.
comment:7 by , 19 years ago
I have to qualify my statement above. The patches do not change the code for the calendar to comply with the specs, they change it in the way that it still complies with the specs but also make it compatible with Outlook. As anonymous already said, according to RFC2445 neither METHOD
nor `DTSTAMP' are mandatory.
comment:8 by , 19 years ago
Status: | new → assigned |
---|
Changing the version to 1.0 breaks compatibility with Apple iCal.
comment:9 by , 19 years ago
The second patch is compatible with iCal, so I'll check that in. Thanks!
comment:11 by , 8 years ago
Keywords: | msoutlook added |
---|
comment:12 by , 8 years ago
Keywords: | ical added |
---|
This must be a bug in Outlook, according to rfc2445 neither DTSTAMP nor METHOD is mandatory.