Fix Google Calendar scheduling over Focus Time and Out of Office events (#50605)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **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 <lucas@fleetdm.com>
This commit is contained in:
co-authored by
Lucas Manuel Rodriguez
parent
133e4a3832
commit
32802c5731
@@ -0,0 +1 @@
|
||||
- Fixed the Google Calendar integration scheduling maintenance events over users' Focus Time and Out of office blocks.
|
||||
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user