From 9c58ca8f77eb5217b60517c179dffb94d56bc275 Mon Sep 17 00:00:00 2001 From: Shraddha Shaligram Date: Sun, 5 Jul 2020 02:33:05 -0700 Subject: [PATCH] :zap: Move Google Task title to top level (#718) --- .../nodes/Google/Task/GoogleTasks.node.ts | 8 ++------ .../nodes/Google/Task/TaskDescription.ts | 15 ++++++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts index 8e2f06dcf5..603bc1af5e 100644 --- a/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts +++ b/packages/nodes-base/nodes/Google/Task/GoogleTasks.node.ts @@ -1,6 +1,6 @@ import { IExecuteFunctions, - } from 'n8n-core'; +} from 'n8n-core'; import { IDataObject, @@ -102,6 +102,7 @@ export class GoogleTasks implements INodeType { body = {}; //https://developers.google.com/tasks/v1/reference/tasks/insert const taskId = this.getNodeParameter('task', i) as string; + body.title = this.getNodeParameter('title', i) as string; const additionalFields = this.getNodeParameter( 'additionalFields', i @@ -121,11 +122,6 @@ export class GoogleTasks implements INodeType { if (additionalFields.notes) { body.notes = additionalFields.notes as string; } - - if (additionalFields.title) { - body.title = additionalFields.title as string; - } - if (additionalFields.dueDate) { body.dueDate = additionalFields.dueDate as string; } diff --git a/packages/nodes-base/nodes/Google/Task/TaskDescription.ts b/packages/nodes-base/nodes/Google/Task/TaskDescription.ts index 8030f0a7f3..3300572f2c 100644 --- a/packages/nodes-base/nodes/Google/Task/TaskDescription.ts +++ b/packages/nodes-base/nodes/Google/Task/TaskDescription.ts @@ -70,6 +70,13 @@ export const taskFields = [ }, default: '', }, + { + displayName: 'Title', + name: 'title', + type: 'string', + default: '', + description: 'Title of the task.', + }, { displayName: 'Additional Fields', name: 'additionalFields', @@ -146,13 +153,7 @@ export const taskFields = [ default: '', description: 'Current status of the task.', }, - { - displayName: 'Title', - name: 'title', - type: 'string', - default: '', - description: 'Title of the task.', - }, + ], }, /* -------------------------------------------------------------------------- */