John Davidson

php - ICalendar with Spatie/ICalendar-Generator creating new meetings rather than updating in Outlook

0 comments
Message:


After taking a look through the following question on SO I added some additional fields and remove some current fields inside the ICS file.


My invitation renders like so:


BEGIN:VCALENDAR
VERSION:2.0
PRODID:spatie/icalendar-generator
NAME:Test ICS 2
X-WR-CALNAME:Test ICS 2
DESCRIPTION:Test ICS 2
X-WR-CALDESC:Test ICS 2
X-WR-RELCALID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:STANDARD
DTSTART:20211031T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20220327T010000Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
END:DAYLIGHT
BEGIN:STANDARD
DTSTART:20221030T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:UTC
BEGIN:STANDARD
DTSTART:20211028T100304Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
DTSTAMP:20220725T100304Z
SUMMARY:Test ICS 2
DESCRIPTION:Test ICS 2
LOCATION:TRUNCATED
CLASS:PRIVATE
STATUS:CONFIRMED
ORGANIZER;CN=TRUNCATED
ATTENDEE;CN=TRUNCATED
DTSTART;TZID=Europe/London:20220725T140000
DTEND;TZID=Europe/London:20220725T143000
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Test ICS 2 is going to start in 15 minutes.
TRIGGER:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

I now want to update the time, so I resend an update ICS like so:


BEGIN:VCALENDAR
VERSION:2.0
PRODID:spatie/icalendar-generator
NAME:Test ICS 2
DESCRIPTION:Test ICS 2
X-WR-CALDESC:Test ICS 2
X-WR-RELCALID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
X-MS-OLK-FORCEINSPECTOROPEN:TRUE
BEGIN:VTIMEZONE
TZID:Europe/London
BEGIN:STANDARD
DTSTART:20211031T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20220327T010000Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0100
END:DAYLIGHT
BEGIN:STANDARD
DTSTART:20221030T020000Z
TZOFFSETFROM:+0100
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VTIMEZONE
TZID:UTC
BEGIN:STANDARD
DTSTART:20211028T100354Z
TZOFFSETFROM:+0000
TZOFFSETTO:+0000
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:someConstValue.ba7be5f8-7404-4bf8-bfe6-80c17e9ade76
DTSTAMP:20220725T100354Z
SUMMARY:Test ICS 2
DESCRIPTION:Test ICS 2
LOCATION:TRUNCATED
CLASS:PRIVATE
STATUS:CONFIRMED
ORGANIZER;CN=TRUNCATED
ATTENDEE;CN=TRUNCATED
DTSTART;TZID=Europe/London:20220725T140500
DTEND;TZID=Europe/London:20220725T143000
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:Test ICS 2 is going to start in 15 minutes.
TRIGGER:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR

I added X-MS-OLK-FORCEINSPECTOROPEN, X-WR-RELCALID and removed X-WR-CALNAME when sending updates as the previous SO threads explain but this still generates a new event in Outlook as apposed to updating the current one.


Can anyone point me in the right direction to what I am missing?



My Answer:
It seems like you are correctly updating the UID in the VEVENT section of your ICS file, which is important for Outlook to recognize the event as an update rather than a new event.

One thing you may want to check is the DTSTAMP field in your VEVENT section. This field should be updated to reflect the current timestamp when you are sending the update. Outlook uses this field to determine the most recent version of the event.

Additionally, make sure that the UID in your updated ICS file matches the UID of the original event that you are trying to update.

If you have checked these things and are still experiencing issues, you may want to try reaching out to the Spatie/ICalendar-Generator community for further assistance.

Rate this post

3 of 5 based on 3587 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us