From d6354fdb8905314b16131ff214b33a06a21405aa Mon Sep 17 00:00:00 2001 From: Gilmar Gatto Filho <36999488+ggatto@users.noreply.github.com> Date: Tue, 27 Jun 2023 14:34:44 -0600 Subject: [PATCH 1/3] Fix missing {} --- solutions/automations/vacation-calendar/Code.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/solutions/automations/vacation-calendar/Code.js b/solutions/automations/vacation-calendar/Code.js index 12eee288a..a8149847b 100644 --- a/solutions/automations/vacation-calendar/Code.js +++ b/solutions/automations/vacation-calendar/Code.js @@ -59,13 +59,13 @@ function sync() { lastRun = lastRun ? new Date(lastRun) : null; // Gets the list of users in the Google Group. - if (ONLY_DIRECT_MEMBERS) - let users = GroupsApp.getGroupByEmail(GROUP_EMAIL).getUsers(); - else if (Array.isArray(GROUP_EMAIL)) - let users = getUsersFromGroups(GROUP_EMAIL); - else - let users = getAllMembers(GROUP_EMAIL); - + if (ONLY_DIRECT_MEMBERS){ + let users = GroupsApp.getGroupByEmail(GROUP_EMAIL).getUsers(); + } else if (Array.isArray(GROUP_EMAIL)) { + let users = getUsersFromGroups(GROUP_EMAIL); + } else { + let users = getAllMembers(GROUP_EMAIL); + } // For each user, finds events having one or more of the keywords in the event // summary in the specified date range. Imports each of those to the team // calendar. From 9b6bf85d74eab0464be83e15ec0f59eff1be4e66 Mon Sep 17 00:00:00 2001 From: Vinay Vyas <69166360+vinay-google@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:48:19 -0700 Subject: [PATCH 2/3] Update Code.js --- solutions/automations/vacation-calendar/Code.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/solutions/automations/vacation-calendar/Code.js b/solutions/automations/vacation-calendar/Code.js index a8149847b..e282dfb47 100644 --- a/solutions/automations/vacation-calendar/Code.js +++ b/solutions/automations/vacation-calendar/Code.js @@ -59,13 +59,13 @@ function sync() { lastRun = lastRun ? new Date(lastRun) : null; // Gets the list of users in the Google Group. + let users = getAllMembers(GROUP_EMAIL); if (ONLY_DIRECT_MEMBERS){ - let users = GroupsApp.getGroupByEmail(GROUP_EMAIL).getUsers(); + users = GroupsApp.getGroupByEmail(GROUP_EMAIL).getUsers(); } else if (Array.isArray(GROUP_EMAIL)) { - let users = getUsersFromGroups(GROUP_EMAIL); - } else { - let users = getAllMembers(GROUP_EMAIL); + users = getUsersFromGroups(GROUP_EMAIL); } + // For each user, finds events having one or more of the keywords in the event // summary in the specified date range. Imports each of those to the team // calendar. From 7fedce13878514739fa093550592cd6360097e91 Mon Sep 17 00:00:00 2001 From: Vinay Vyas <69166360+vinay-google@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:49:11 -0700 Subject: [PATCH 3/3] Update Code.js --- solutions/automations/vacation-calendar/Code.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/automations/vacation-calendar/Code.js b/solutions/automations/vacation-calendar/Code.js index e282dfb47..d00a2bee6 100644 --- a/solutions/automations/vacation-calendar/Code.js +++ b/solutions/automations/vacation-calendar/Code.js @@ -65,7 +65,7 @@ function sync() { } else if (Array.isArray(GROUP_EMAIL)) { users = getUsersFromGroups(GROUP_EMAIL); } - + // For each user, finds events having one or more of the keywords in the event // summary in the specified date range. Imports each of those to the team // calendar.