From 32802c573164582119221b72fb876c97f1758d94 Mon Sep 17 00:00:00 2001 From: Harrison Ravazzolo <38767391+harrisonravazzolo@users.noreply.github.com> Date: Thu, 6 Aug 2026 11:05:30 -0700 Subject: [PATCH] Fix Google Calendar scheduling over Focus Time and Out of Office events (#50605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Related issue:** Resolves https://github.com/fleetdm/fleet/issues/50548 Fleet's calendar integration was scheduling maintenance events over users' **Focus Time** and **Out of Office** blocks, even when those were marked Busy. The root cause is the event query in `ListEvents` (ee/server/calendar/google_calendar.go), which only requested `"default"` event types — so `focusTime` and `outOfOffice` events were never returned and never considered during conflict detection. ## Change Added the blocking event types to the query: ```go EventTypes("default", "focusTime", "outOfOffice"). ``` # Checklist for submitter If some of the following don't apply, delete the relevant line. - [x] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. --------- Co-authored-by: Lucas Manuel Rodriguez --- changes/50548-calendar-focus-time-out-of-office.md | 1 + ee/server/calendar/google_calendar.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/50548-calendar-focus-time-out-of-office.md diff --git a/changes/50548-calendar-focus-time-out-of-office.md b/changes/50548-calendar-focus-time-out-of-office.md new file mode 100644 index 0000000000..568711cec2 --- /dev/null +++ b/changes/50548-calendar-focus-time-out-of-office.md @@ -0,0 +1 @@ +- Fixed the Google Calendar integration scheduling maintenance events over users' Focus Time and Out of office blocks. diff --git a/ee/server/calendar/google_calendar.go b/ee/server/calendar/google_calendar.go index a338eefab9..7538185c81 100644 --- a/ee/server/calendar/google_calendar.go +++ b/ee/server/calendar/google_calendar.go @@ -197,7 +197,7 @@ func (lowLevelAPI *GoogleCalendarLowLevelAPI) ListEvents(timeMin, timeMax string } // Default maximum number of events returned is 250, which should be sufficient for most calendars. return lowLevelAPI.service.Events.List(calendarID). - EventTypes("default"). + EventTypes("default", "focusTime", "outOfOffice"). OrderBy("startTime"). SingleEvents(true). TimeMin(timeMin).