When creating a new event over CalDAV, such as via Android Google Calendar + DavX, the event will not be populated with the calendar default alarms.
Inspection of the event via JMAP shows useDefaultAlerts=false on these events.
Setting useDefaultAlerts via JMAP applies the default alarms as expected.
Expected Behavior
I would expect new events to apply default alarms unless explicitly set to not do so. I don’t think useDefaultAlerts is even exposed in CalDAV but I could be wrong about that.
Actual Behavior
Event is created with no alarms.
Reproduction Steps
Create event with CalDAV on a calendar with default alarms.
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
Going by the source, this is what I’d expect from the current code, though I couldn’t find a documented CalDAV equivalent of useDefaultAlerts.
Stalwart stores useDefaultAlerts per user as a preference flag on the event, not inside the iCalendar data. The changelog says CalendarEvent/set stores it per user, and CalendarEvent/get returns false when it was never set. The calendar docs describe the behaviour: an event with useDefaultAlerts set uses the calendar’s defaults in place of its own alerts.
The CalDAV handlers (crates/dav/src/calendar/update.rs and related files) only use the default-alerts resolver to merge alerts into the event when it is read. I found no place where a CalDAV PUT sets that flag on a new event. An event created through DavX or Google Calendar therefore never opts in, and it shows useDefaultAlerts=false when you inspect it over JMAP. That matches what you saw, including the fact that setting the flag through JMAP makes the defaults apply.
I didn’t find any CalDAV-side mapping for the flag in the docs or source. I also can’t tell from here whether applying the calendar defaults to CalDAV-created events is intended. A staff member will need to confirm that, and say whether it will change.
As a workaround, you could add the alarms (VALARM) in the client itself. Most CalDAV clients support per-calendar default reminders, and the client then writes them into the event. Alternatively, set useDefaultAlerts through JMAP after creation.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.
Agree, JMAP and CalDAV are not 100% identical in design so mapping requires some assumption of intent. I don’t think it makes sense to re-set calendar defaults per-client as this becomes a conflicting source of truth compared to the server.
Also, Google Calendar doesn’t support setting email alert defaults in the UI for CalDAV calendars (though it does for its own native calendars). So, there really is no way to get that sort of default functionality.
I already created a CronJob that just checks for new events missing alarms and sets the default flag. That is a bit of a hack, but it does work.
Those events end up with useDefaultAlerts=false because false is the property’s default in JMAP for Calendars, and CalDAV has no way to set it. A PUT only carries iCalendar data, so an event without a VALARM is stored as an event with no alarms. The server can’t tell a client that knows nothing about default alerts from a user who removed the reminder on purpose.
Turning the defaults on for every CalDAV event without alarms would change what those clients see. Anything that syncs or imports existing events would suddenly get reminders on them, including events that were meant to have none. I can see why you want it, since the calendar’s defaults are the one source of truth you’re after, but it would need to be something you opt into.