From f430c385b4c847a220d158c5e70267d66de6b3e1 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 19 Oct 2021 18:37:30 -0400 Subject: [PATCH] :bug: Fix Jira expand (#2341) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 Jira expects array for JSON parameter * 🔨 Add loadOptions for users * Small change to #2339 Co-authored-by: pemontto --- packages/nodes-base/nodes/Jira/IssueDescription.ts | 2 +- packages/nodes-base/nodes/Jira/Jira.node.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/Jira/IssueDescription.ts b/packages/nodes-base/nodes/Jira/IssueDescription.ts index 9ff54c8218..64b5497ac4 100644 --- a/packages/nodes-base/nodes/Jira/IssueDescription.ts +++ b/packages/nodes-base/nodes/Jira/IssueDescription.ts @@ -661,7 +661,7 @@ export const issueFields = [ { displayName: 'Expand', name: 'expand', - type: 'options', + type: 'multiOptions', default: '', options: [ { diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index 0f844630a8..5dcd27e984 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -594,7 +594,11 @@ export class Jira implements INodeType { body.jql = options.jql as string; } if (options.expand) { - body.expand = options.expand as string; + if (typeof options.expand === 'string') { + body.expand = options.expand.split(','); + } else { + body.expand = options.expand; + } } if (returnAll) { responseData = await jiraSoftwareCloudApiRequestAllItems.call(this, 'issues', `/api/2/search`, 'POST', body);