Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 7 years ago

#1988 closed defect (fixed)

Roadmap iCalendar not compatible with Outlook

Reported by: malatmals@… 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 anonymous, 19 years ago

This must be a bug in Outlook, according to rfc2445 neither DTSTAMP nor METHOD is mandatory.

comment:2 by markus, 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 anonymous, 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 markus, 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:5 by Christopher Lenz, 19 years ago

VEVENTs are included for milestones that have a due date.

comment:6 by markus, 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

     
    141141        user = req.args.get('user', 'anonymous')
    142142
    143143        write_prop('BEGIN', 'VCALENDAR')
    144         write_prop('VERSION', '2.0')
     144        write_prop('VERSION', '1.0')
    145145        write_prop('PRODID', '-//Edgewall Software//NONSGML Trac %s//EN'
    146146                   % __version__)
    147147        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

     
    144144        write_prop('VERSION', '2.0')
    145145        write_prop('PRODID', '-//Edgewall Software//NONSGML Trac %s//EN'
    146146                   % __version__)
     147        write_prop('METHOD', 'PUBLISH')
    147148        write_prop('X-WR-CALNAME',
    148149                   self.config.get('project', 'name') + ' - Roadmap')
    149150        for milestone in milestones:
     
    152153            if milestone.has_key('due'):
    153154                write_prop('BEGIN', 'VEVENT')
    154155                write_prop('UID', uid)
     156                write_date('DTSTAMP', localtime(milestone['due']))
    155157                write_date('DTSTART', localtime(milestone['due']))
    156158                write_prop('SUMMARY', 'Milestone %s' % milestone['name'])
    157159                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 markus, 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 Christopher Lenz, 19 years ago

Status: newassigned

Changing the version to 1.0 breaks compatibility with Apple iCal.

comment:9 by Christopher Lenz, 19 years ago

The second patch is compatible with iCal, so I'll check that in. Thanks!

comment:10 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [2377].

comment:11 by Peter Suter, 7 years ago

Keywords: msoutlook added

comment:12 by Peter Suter, 7 years ago

Keywords: ical added

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.