From 5bef91e3c84a15a30a893ce3b321b7a8ea926963 Mon Sep 17 00:00:00 2001 From: Michael Kret <88898367+michael-radency@users.noreply.github.com> Date: Fri, 19 May 2023 10:39:39 +0300 Subject: [PATCH] fix(Google Calendar Node): All day option fix (#6274) --- .../nodes-base/nodes/Google/Calendar/EventDescription.ts | 6 +++--- .../nodes/Google/Calendar/GoogleCalendar.node.ts | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts b/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts index 6383c04a0d..ee0d162b76 100644 --- a/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts +++ b/packages/nodes-base/nodes/Google/Calendar/EventDescription.ts @@ -171,7 +171,7 @@ export const eventFields: INodeProperties[] = [ }, ], default: 'no', - description: 'Wheater the event is all day or not', + description: 'Whether the event is all day or not', }, { displayName: 'Attendees', @@ -224,7 +224,7 @@ export const eventFields: INodeProperties[] = [ ], }, ], - description: 'Creates a conference link (Hangouts, Meet etc) and attachs it to the event', + description: 'Creates a conference link (Hangouts, Meet etc) and attaches it to the event', }, { displayName: 'Description', @@ -828,7 +828,7 @@ export const eventFields: INodeProperties[] = [ }, ], default: 'no', - description: 'Wheater the event is all day or not', + description: 'Whether the event is all day or not', }, { displayName: 'Attendees', diff --git a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts index 8fa0bd42a8..36a9b1a78e 100644 --- a/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts +++ b/packages/nodes-base/nodes/Google/Calendar/GoogleCalendar.node.ts @@ -269,7 +269,7 @@ export class GoogleCalendar implements INodeType { } } - if (additionalFields.allday) { + if (additionalFields.allday === 'yes') { body.start = { date: timezone ? moment.tz(start, timezone).utc(true).format('YYYY-MM-DD') @@ -281,6 +281,7 @@ export class GoogleCalendar implements INodeType { : moment.tz(end, moment.tz.guess()).utc(true).format('YYYY-MM-DD'), }; } + //exampel: RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=10;UNTIL=20110701T170000Z //https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html body.recurrence = []; @@ -526,7 +527,8 @@ export class GoogleCalendar implements INodeType { body.reminders.overrides = reminders; } } - if (updateFields.allday && updateFields.start && updateFields.end) { + + if (updateFields.allday === 'yes' && updateFields.start && updateFields.end) { body.start = { date: updateTimezone ? moment.tz(updateFields.start, updateTimezone).utc(true).format('YYYY-MM-DD') @@ -538,7 +540,7 @@ export class GoogleCalendar implements INodeType { : moment.tz(updateFields.end, moment.tz.guess()).utc(true).format('YYYY-MM-DD'), }; } - //exampel: RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=10;UNTIL=20110701T170000Z + //example: RRULE:FREQ=WEEKLY;INTERVAL=2;COUNT=10;UNTIL=20110701T170000Z //https://icalendar.org/iCalendar-RFC-5545/3-8-5-3-recurrence-rule.html body.recurrence = []; if (updateFields.rrule) {