From b19833d673bd554ba86c0b234e8d13633912563a Mon Sep 17 00:00:00 2001 From: Alberto Pasqualetto <39854348+albertopasqualetto@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:55:40 +0200 Subject: [PATCH] feat(Microsoft To Do Node): Add an option to set a reminder when creating a task (#5757) --- .../nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts | 8 ++++++++ .../nodes-base/nodes/Microsoft/ToDo/TaskDescription.ts | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts index c6ef0442c..869eb34b6 100644 --- a/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts +++ b/packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts @@ -221,6 +221,14 @@ export class MicrosoftToDo implements INodeType { }; } + if (body.reminderDateTime) { + body.reminderDateTime = { + dateTime: moment.tz(body.reminderDateTime, timezone).format(), + timeZone: timezone, + }; + body.isReminderOn = true; + } + responseData = await microsoftApiRequest.call( this, 'POST', diff --git a/packages/nodes-base/nodes/Microsoft/ToDo/TaskDescription.ts b/packages/nodes-base/nodes/Microsoft/ToDo/TaskDescription.ts index a04813988..9e7105a6e 100644 --- a/packages/nodes-base/nodes/Microsoft/ToDo/TaskDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/ToDo/TaskDescription.ts @@ -105,6 +105,13 @@ export const taskFields: INodeProperties[] = [ default: '', description: 'The date in the specified time zone that the task is to be finished', }, + { + displayName: 'Reminder', + name: 'reminderDateTime', + type: 'dateTime', + default: '', + description: 'The date in the specified time zone that the task is to be reminded', + }, { displayName: 'Importance', name: 'importance',