Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Google Calendar Node): All day option fix #6274

Merged
merged 2 commits into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/nodes-base/nodes/Google/Calendar/EventDescription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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 = [];
Expand Down Expand Up @@ -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')
Expand All @@ -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) {
Expand Down