-
Notifications
You must be signed in to change notification settings - Fork 676
Calendar: no way to create or update an event with NO reminders (useDefault:false + empty overrides) #1002
Copy link
Copy link
Open
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Problem
There is no way to create or update a calendar event with no reminders.
The Calendar API distinguishes three states:
reminderspayloaddefaultReminders{"useDefault": false, "overrides": [{...}]}{"useDefault": false, "overrides": []}gogcan express the first two. The third is unreachable, because an empty--reminderis treated as "unspecified" rather than as "none".Why it matters
Google applies a calendar's single
defaultReminderslist to all-day eventscreated via the API, ignoring the separate "All-day event notifications" setting
shown in the web UI. So an all-day event created by
gogon a calendar whosetimed default is
popup 10minherits that popup — and a 10-minute popup on anall-day event fires at 23:50 the evening before.
There is no way to avoid this from
gog: clearing the all-day setting in the UIhas no effect (the API path uses
defaultReminders), and the timed default hasto stay for real meetings.
Reproduction
The request body contains no
reminderskey, so the default is inherited:Attempting to suppress it:
The update case is the surprising one:
--reminder ""documents as "Set empty toclear", but it sets
useDefault: true, which restores the calendar defaultrather than clearing reminders.
Cause
buildRemindersininternal/cmd/calendar_build.goreturnsnilfor an emptyinput, and
nilmeans "use calendar defaults":EventReminders{UseDefault: false, Overrides: overrides}is only everconstructed with at least one override, so
overrides: []is unreachable. Incalendar_update_patch_plan.goanilbecomes{UseDefault: true}.Confirmed identical on 0.12.0 and 0.37.0.
Suggested fix
A
--no-reminder/--reminders-noneflag (or a reserved--reminder none)that produces:
with
UseDefaultinForceSendFields, exactly as the existing override pathalready does.
Workaround
Calling the API directly with that body works — Google accepts an empty
overrides list without complaint, so the limitation is purely in how the flag is
interpreted:
Version