🐛 Fix Jira expand (#2341)

* 🐛 Jira expects array for JSON parameter

* 🔨 Add loadOptions for users

* Small change to #2339

Co-authored-by: pemontto <pemontto@gmail.com>
This commit is contained in:
Ricardo Espinoza 2021-10-19 18:37:30 -04:00 committed by GitHub
parent d9661e353e
commit f430c385b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -661,7 +661,7 @@ export const issueFields = [
{ {
displayName: 'Expand', displayName: 'Expand',
name: 'expand', name: 'expand',
type: 'options', type: 'multiOptions',
default: '', default: '',
options: [ options: [
{ {

View file

@ -594,7 +594,11 @@ export class Jira implements INodeType {
body.jql = options.jql as string; body.jql = options.jql as string;
} }
if (options.expand) { 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) { if (returnAll) {
responseData = await jiraSoftwareCloudApiRequestAllItems.call(this, 'issues', `/api/2/search`, 'POST', body); responseData = await jiraSoftwareCloudApiRequestAllItems.call(this, 'issues', `/api/2/search`, 'POST', body);