Open eyenx opened 3 years ago
Hi @eyenx and thanks for your detailed report. About STATUS
, RFC say (link):
Conformance: This property can be specified once in "VEVENT", "VTODO", or "VJOURNAL" calendar components.
So maybe we can sanitize multiple STATUS
to be compatible with such services / programs but we will not be RFC Compliant
At the very least, we shouldn't throw an exception (but a warning).
@eyenx can you perhaps post an anonymized version of one of those .ics files? I currently have no clear picture yet, how those multiple status occur. (Are the multiple Status all one after the other? Are they scattered through the .ics file?)
Yes, here you go. This happens, for me with KOPANO when a recurring event is moved out of the timeframe it would usually be:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Kopano//8.7.19//EN
CALSCALE:GREGORIAN
METHOD:REQUEST
BEGIN:VTIMEZONE
TZID:(GMT +01:00)
BEGIN:STANDARD
DTSTART:19700101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10;WKST=SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:19700101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3;WKST=SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx:mailto:xxx.xxx@xxx.com
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
DTSTART;TZID="(GMT +01:00)":20201130T070000
DTEND;TZID="(GMT +01:00)":20201130T093000
SUMMARY:Training
PRIORITY:5
CLASS:PUBLIC
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
RRULE:FREQ=WEEKLY;BYDAY=MO,TU,WE,FR
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
SUMMARY:Training
PRIORITY:5
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx;SENT-BY="mailto:xxx.xxx@xxx.com":mailto:
xxx.xxx@xxx.com
DTSTART;TZID="(GMT +01:00)":20210421T110000
DTEND;TZID="(GMT +01:00)":20210421T124500
RECURRENCE-ID;TZID="(GMT +01:00)":20210421T070000
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
SUMMARY:Training
PRIORITY:5
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx;SENT-BY="mailto:xxx.xxx@xxx.com":mailto:
xxx.xxx@xxx.com
DTSTART;TZID="(GMT +01:00)":20210427T070000
DTEND;TZID="(GMT +01:00)":20210427T110000
RECURRENCE-ID;TZID="(GMT +01:00)":20210427T070000
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
SUMMARY:Training
PRIORITY:5
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx;SENT-BY="mailto:xxx.xxx@xxx.com":mailto:
xxx.xxx@xxx.com
DTSTART;TZID="(GMT +01:00)":20210505T160000
DTEND;TZID="(GMT +01:00)":20210505T183000
RECURRENCE-ID;TZID="(GMT +01:00)":20210505T070000
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
SUMMARY:Training
PRIORITY:5
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx;SENT-BY="mailto:xxx.xxx@xxx.com":mailto:
xxx.xxx@xxx.com
DTSTART;TZID="(GMT +01:00)":20210510T113000
DTEND;TZID="(GMT +01:00)":20210510T140000
RECURRENCE-ID;TZID="(GMT +01:00)":20210510T070000
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
SUMMARY:xxx
PRIORITY:5
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx;SENT-BY="mailto:xxx.xxx@xxx.com":mailto:
xxx.xxx@xxx.com
DTSTART;TZID="(GMT +01:00)":20210512T113000
DTEND;TZID="(GMT +01:00)":20210512T140000
RECURRENCE-ID;TZID="(GMT +01:00)":20210512T070000
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
BEGIN:VEVENT
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
TRANSP:OPAQUE
X-MICROSOFT-CDO-INTENDEDSTATUS:OOF
CREATED:20201127T064839Z
DTSTAMP:20210331T180338Z
LAST-MODIFIED:20210512T091729Z
SUMMARY:Training
PRIORITY:5
UID:
040000008200E00074C5B7101A82E00800000000803550E3CEC4D601000000000000000001
00000080C900B5003447849743BD251B5C9FBD
SEQUENCE:1
X-MOZ-SNOOZE-TIME:20210514T044500Z
X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20210331T180338Z
X-MICROSOFT-CDO-APPT-SEQUENCE:1
X-MICROSOFT-CDO-OWNERAPPTID:-1
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-KOPANO-REC-PATTERN:Occurs every week on Monday\, Tuesday\, Wednesday\,
and Friday effective 11/30/2020 from 7:00 to 9:30.
STATUS:CONFIRMED
X-MOZ-SEND-INVITATIONS:TRUE
ORGANIZER;CN=xxx xxx;SENT-BY="mailto:xxx.xxx@xxx.com":mailto:
xxx.xxx@xxx.com
DTSTART;TZID="(GMT +01:00)":20210517T113000
DTEND;TZID="(GMT +01:00)":20210517T140000
RECURRENCE-ID;TZID="(GMT +01:00)":20210517T070000
BEGIN:VALARM
TRIGGER:-PT15M
ACTION:DISPLAY
DESCRIPTION:Reminder
END:VALARM
END:VEVENT
END:VCALENDAR
While we should probably do something on the khal side too, have you also reported to this to Kopano?
Not yet.
On 12 May 2021 17:15:26 CEST, Martin Stone @.***> wrote:
While we should probably do something on the khal side too, have you also reported to this to Kopano?
It's probably worth pointing out that they're not standards compliant. Especially if you're a paying customer.
Will do.
On 12 May 2021 17:50:16 CEST, Martin Stone @.***> wrote:
It's probably worth pointing out that they're not standards compliant. Especially if you're a paying customer.
Some Calendar tools, create ICS objects of invitations with multiple Status fields. This seems for me to happen on Kopano, when I change a reccurring invitation Item to not be recurring anymore for one day. (A.e. recurring daily meeting is rescheduled to a later point in the day).
This looks like this:
When I then want to use khal to see the events or khal interactive, following happens:
Traceback:
Debugging
Tried to debugg the issue. Looks like
event.py
can't handle a list of "STATUS". Tried adding a print on line 662 ofevent.py
to print out the state:Normal invitationICS:
Invitation which isn't recurring for one day:
Quickfix
My quickfix for now was to add following lines inside
event.py
on line 661This just returns only the first item of a status if it's a list. But I guess it could be done better by writing a sanitize function somewhere else.