Skip to content

Commit

Permalink
feat(Microsoft To Do Node): Add an option to set a reminder when upda…
Browse files Browse the repository at this point in the history
…ting a task (#6918)

Co-authored-by: Jonathan Bennetts <jonathan.bennetts@gmail.com>
  • Loading branch information
albertopasqualetto and Joffcom committed Apr 25, 2024
1 parent 42a9891 commit 22b2afd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/nodes-base/nodes/Microsoft/ToDo/MicrosoftToDo.node.ts
Expand Up @@ -311,6 +311,16 @@ export class MicrosoftToDo implements INodeType {
};
}

if (body.reminderDateTime) {
body.reminderDateTime = {
dateTime: moment.tz(body.reminderDateTime, timezone).format(),
timeZone: timezone,
};
body.isReminderOn = true;
} else {
body.isReminderOn = false;
}

responseData = await microsoftApiRequest.call(
this,
'PATCH',
Expand Down
7 changes: 7 additions & 0 deletions packages/nodes-base/nodes/Microsoft/ToDo/TaskDescription.ts
Expand Up @@ -266,6 +266,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',
Expand Down

0 comments on commit 22b2afd

Please sign in to comment.