From 021762c74e660969b975aeb297d02dfc39beaa8a Mon Sep 17 00:00:00 2001 From: mtahiue Date: Fri, 8 Nov 2019 12:41:47 +0100 Subject: [PATCH 1/4] Added due_date to gitlab create and edit issue --- .../nodes-base/nodes/Gitlab/Gitlab.node.ts | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index bcf5712a8..b83206244 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -317,7 +317,31 @@ export class Gitlab implements INodeType { }, ], }, - + { + displayName: 'Due Date', + name: 'date_date', + type: 'string', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'issue', + ], + }, + }, + default: { 'due_date': '' }, + options: [ + { + displayName: 'Due Date', + name: 'date_date', + type: 'string', + default: 0, + description: 'Due Date for issue. Date time string in the format YEAR-MONTH-DAY, e.g. 2016-03-11', + }, + ], + }, // ---------------------------------- // issue:createComment // ---------------------------------- @@ -474,6 +498,13 @@ export class Gitlab implements INodeType { }, ], }, + { + displayName: 'Due Date', + name: 'due_date', + type: 'string', + default: '', + description: 'The Due Date of the issue. Date time string in the format YEAR-MONTH-DAY, e.g. 2016-03-11', + }, ], }, From bea9fd033b944fa2ad9e8a7b8f727b79af16c92f Mon Sep 17 00:00:00 2001 From: mtahiue Date: Fri, 8 Nov 2019 15:10:45 +0100 Subject: [PATCH 2/4] Fixed name of description field --- packages/nodes-base/nodes/Gitlab/Gitlab.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index b83206244..47ac63b32 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -241,7 +241,7 @@ export class Gitlab implements INodeType { }, { displayName: 'Body', - name: 'body', + name: 'description', type: 'string', typeOptions: { rows: 5, From 2a54958c0f01a3dfc49d56eeec6b0936c380564c Mon Sep 17 00:00:00 2001 From: mtahiue Date: Fri, 8 Nov 2019 15:13:48 +0100 Subject: [PATCH 3/4] Fixed name of description field for edit --- packages/nodes-base/nodes/Gitlab/Gitlab.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index 47ac63b32..979bef8f7 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -433,7 +433,7 @@ export class Gitlab implements INodeType { }, { displayName: 'Body', - name: 'body', + name: 'description', type: 'string', typeOptions: { rows: 5, From ae0ee5ca0127d9c8f0ca3ade3cfe243f4959450d Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Sun, 10 Nov 2019 10:17:56 +0100 Subject: [PATCH 4/4] :zap: Fix due_date on Gitlab-Node --- .../nodes-base/nodes/Gitlab/Gitlab.node.ts | 51 +++++++++---------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index c37cfd8b8..1f1d0b519 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -241,7 +241,7 @@ export class Gitlab implements INodeType { }, { displayName: 'Body', - name: 'description', + name: 'body', type: 'string', typeOptions: { rows: 5, @@ -259,6 +259,23 @@ export class Gitlab implements INodeType { }, description: 'The body of the issue.', }, + { + displayName: 'Due Date', + name: 'due_date', + type: 'dateTime', + displayOptions: { + show: { + operation: [ + 'create', + ], + resource: [ + 'issue', + ], + }, + }, + default: '', + description: 'Due Date for issue.', + }, { displayName: 'Labels', name: 'labels', @@ -317,31 +334,8 @@ export class Gitlab implements INodeType { }, ], }, - { - displayName: 'Due Date', - name: 'date_date', - type: 'string', - displayOptions: { - show: { - operation: [ - 'create', - ], - resource: [ - 'issue', - ], - }, - }, - default: { 'due_date': '' }, - options: [ - { - displayName: 'Due Date', - name: 'date_date', - type: 'string', - default: 0, - description: 'Due Date for issue. Date time string in the format YEAR-MONTH-DAY, e.g. 2016-03-11', - }, - ], - }, + + // ---------------------------------- // issue:createComment // ---------------------------------- @@ -501,9 +495,9 @@ export class Gitlab implements INodeType { { displayName: 'Due Date', name: 'due_date', - type: 'string', + type: 'dateTime', default: '', - description: 'The Due Date of the issue. Date time string in the format YEAR-MONTH-DAY, e.g. 2016-03-11', + description: 'Due Date for issue.', }, ], }, @@ -860,6 +854,7 @@ export class Gitlab implements INodeType { body.title = this.getNodeParameter('title', i) as string; body.description = this.getNodeParameter('body', i) as string; + body.due_date = this.getNodeParameter('due_date', i) as string; const labels = this.getNodeParameter('labels', i) as IDataObject[]; const assigneeIds = this.getNodeParameter('assignee_ids', i) as IDataObject[];