[Bug]: Email notification for cancelled event does not show cancelled status
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
The email notification for an event that was cancelled only says that the event was updated, it does not show the status "cancelled". Thus the email looks as if some other attribute (e.g. the time) was changed, which is confusing.
Steps to reproduce
- Create an event with an attendee.
- Save it.
- Open it, set status to cancelled.
- Save it.
- See email notification.
Expected behavior
The email notification should tell me that the event was cancelled.
Installation method
None
Nextcloud Server version
29 (29.0.4.1 on c.nc.com)
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- [ ] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
The email notification for an event that was cancelled only says that the event was updated, it does not show the status "cancelled". Thus the email looks as if some other attribute (e.g. the time) was changed, which is confusing.
To add to the confusion: if only the even status changed, it will show the SUMMARY (title) as changed.
The issue is that modifying the state is not actually sending a CANCEL but a REQUEST.
This is what happens when the status is used.
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
PRODID:-//IDN nextcloud.com//Calendar app 5.0.0-alpha.4//EN
BEGIN:VEVENT
CREATED:20240827T174104Z
DTSTAMP:20240828T145808Z
LAST-MODIFIED:20240828T145808Z
SEQUENCE:3
UID:762730a7-09a2-466e-b80a-b655b94fed06
DTSTART;TZID=America/Toronto:20240906T100000
DTEND;TZID=America/Toronto:20240906T110000
STATUS:CANCELLED
SUMMARY:This is a test
ATTENDEE;CN=User 2;CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICI
PANT;RSVP=TRUE;LANGUAGE=en;SCHEDULE-STATUS=5.0:mailto:[email protected]
ORGANIZER;CN=User 1:mailto:[email protected]
END:VEVENT
END:VCALENDAR
Issue is with the iTipBroker its generating a request instead of a cancelled message.
Tested a fix.
The change required is in the Sabre\VObject\ITip\Broker:506, currently there is no test for events with a CANCELLED status property...
if (!$attendee['newInstances'])
changing this to...
if (!$attendee['newInstances'] || $eventInfo['status'] === 'CANCELLED')
Fixes the issue and generates proper CANCEL messages.
Upstream PR: https://github.com/sabre-io/vobject/pull/669
Fix has been released in https://github.com/sabre-io/vobject/releases/tag/4.5.6 which also supports upcoming PHP 8.4
Confirmed fixed with https://github.com/nextcloud/server/pull/48583
iTip messages are now generated when changing the event STATUS to CANCELLED.