diff --git a/packages/nodes-base/credentials/JiraSoftwareCloudApi.credentials.ts b/packages/nodes-base/credentials/JiraSoftwareCloudApi.credentials.ts
index a11d526f7d..430a21163b 100644
--- a/packages/nodes-base/credentials/JiraSoftwareCloudApi.credentials.ts
+++ b/packages/nodes-base/credentials/JiraSoftwareCloudApi.credentials.ts
@@ -24,6 +24,7 @@ export class JiraSoftwareCloudApi implements ICredentialType {
name: 'domain',
type: 'string' as NodePropertyTypes,
default: '',
+ placeholder: 'https://example.atlassian.net',
},
];
}
diff --git a/packages/nodes-base/credentials/JiraSoftwareServerApi.credentials.ts b/packages/nodes-base/credentials/JiraSoftwareServerApi.credentials.ts
index 47d94eb6f0..73b4b2a97b 100644
--- a/packages/nodes-base/credentials/JiraSoftwareServerApi.credentials.ts
+++ b/packages/nodes-base/credentials/JiraSoftwareServerApi.credentials.ts
@@ -27,6 +27,7 @@ export class JiraSoftwareServerApi implements ICredentialType {
name: 'domain',
type: 'string' as NodePropertyTypes,
default: '',
+ placeholder: 'https://example.com',
},
];
}
diff --git a/packages/nodes-base/nodes/Jira/GenericFunctions.ts b/packages/nodes-base/nodes/Jira/GenericFunctions.ts
index 421f508193..66ca437ded 100644
--- a/packages/nodes-base/nodes/Jira/GenericFunctions.ts
+++ b/packages/nodes-base/nodes/Jira/GenericFunctions.ts
@@ -2,10 +2,9 @@ import { OptionsWithUri } from 'request';
import {
IExecuteFunctions,
+ IExecuteSingleFunctions,
IHookFunctions,
ILoadOptionsFunctions,
- IExecuteSingleFunctions,
- BINARY_ENCODING
} from 'n8n-core';
import {
@@ -16,21 +15,22 @@ export async function jiraSoftwareCloudApiRequest(this: IHookFunctions | IExecut
let data; let domain;
const jiraCloudCredentials = this.getCredentials('jiraSoftwareCloudApi');
const jiraServerCredentials = this.getCredentials('jiraSoftwareServerApi');
- if (jiraCloudCredentials === undefined
- && jiraServerCredentials === undefined) {
+ if (jiraCloudCredentials === undefined && jiraServerCredentials === undefined) {
throw new Error('No credentials got returned!');
}
if (jiraCloudCredentials !== undefined) {
domain = jiraCloudCredentials!.domain;
- data = Buffer.from(`${jiraCloudCredentials!.email}:${jiraCloudCredentials!.apiToken}`).toString(BINARY_ENCODING);
+ data = Buffer.from(`${jiraCloudCredentials!.email}:${jiraCloudCredentials!.apiToken}`).toString('base64');
} else {
domain = jiraServerCredentials!.domain;
- data = Buffer.from(`${jiraServerCredentials!.email}:${jiraServerCredentials!.password}`).toString(BINARY_ENCODING);
+ data = Buffer.from(`${jiraServerCredentials!.email}:${jiraServerCredentials!.password}`).toString('base64');
}
- const headerWithAuthentication = Object.assign({},
- { Authorization: `Basic ${data}`, Accept: 'application/json', 'Content-Type': 'application/json' });
const options: OptionsWithUri = {
- headers: headerWithAuthentication,
+ headers: {
+ Authorization: `Basic ${data}`,
+ Accept: 'application/json',
+ 'Content-Type': 'application/json',
+ },
method,
qs: query,
uri: uri || `${domain}/rest/api/2${endpoint}`,
diff --git a/packages/nodes-base/nodes/Jira/IssueDescription.ts b/packages/nodes-base/nodes/Jira/IssueDescription.ts
index 3712f9f047..ae46db23e3 100644
--- a/packages/nodes-base/nodes/Jira/IssueDescription.ts
+++ b/packages/nodes-base/nodes/Jira/IssueDescription.ts
@@ -518,14 +518,53 @@ export const issueFields = [
default: {},
options: [
{
- displayName: ' JQL',
- name: 'jql',
- type: 'string',
+ displayName: 'Expand',
+ name: 'expand',
+ type: 'options',
default: '',
- typeOptions: {
- alwaysOpenEditWindow: true,
- },
- description: 'A JQL expression.',
+ options: [
+ {
+ name: 'Changelog',
+ value: 'changelog',
+ description: 'Returns a list of recent updates to an issue, sorted by date, starting from the most recent.',
+ },
+ {
+ name: 'Editmeta',
+ value: 'editmeta',
+ description: 'Returns information about how each field can be edited',
+ },
+ {
+ name: 'Names',
+ value: 'names',
+ description: 'Returns the display name of each field',
+ },
+ {
+ name: 'Operations',
+ value: 'operations',
+ description: 'Returns all possible operations for the issue.',
+ },
+ {
+ name: 'Rendered Fields',
+ value: 'renderedFields',
+ description: ' Returns field values rendered in HTML format.',
+ },
+ {
+ name: 'Schema',
+ value: 'schema',
+ description: 'Returns the schema describing a field type.',
+ },
+ {
+ name: 'Transitions',
+ value: 'transitions',
+ description: ' Returns all possible transitions for the issue.',
+ },
+ {
+ name: 'Versioned Representations',
+ value: 'versionedRepresentations',
+ description: `JSON array containing each version of a field's value`,
+ },
+ ],
+ description: `Use expand to include additional information about issues in the response`,
},
{
displayName: 'Fields',
@@ -537,55 +576,6 @@ export const issueFields = [
*navigable Returns navigable fields.
Any issue field, prefixed with a minus to exclude.
`,
},
- {
- displayName: 'Expand',
- name: 'expand',
- type: 'options',
- default: '',
- options: [
- {
- name: 'Rendered Fields',
- valie: 'renderedFields',
- description: ' Returns field values rendered in HTML format.',
- },
- {
- name: 'Names',
- valie: 'names',
- description: 'Returns the display name of each field',
- },
- {
- name: 'Schema',
- valie: 'schema',
- description: 'Returns the schema describing a field type.',
- },
- {
- name: 'Transitions',
- valie: 'transitions',
- description: ' Returns all possible transitions for the issue.',
- },
- {
- name: 'Operations',
- valie: 'operations',
- description: 'Returns all possible operations for the issue.',
- },
- {
- name: 'Editmeta',
- valie: 'editmeta',
- description: 'Returns information about how each field can be edited',
- },
- {
- name: 'Changelog',
- valie: 'changelog',
- description: 'Returns a list of recent updates to an issue, sorted by date, starting from the most recent.',
- },
- {
- name: 'Versioned Representations',
- valie: 'versionedRepresentations',
- description: `JSON array containing each version of a field's value`,
- },
- ],
- description: `Use expand to include additional information about issues in the response`,
- },
{
displayName: 'Fields By Key',
name: 'fieldsByKey',
@@ -596,6 +586,16 @@ export const issueFields = [
This parameter is useful where fields have been added by a connect app and a field's key
may differ from its ID.`,
},
+ {
+ displayName: ' JQL',
+ name: 'jql',
+ type: 'string',
+ default: '',
+ typeOptions: {
+ alwaysOpenEditWindow: true,
+ },
+ description: 'A JQL expression.',
+ },
],
},
/* -------------------------------------------------------------------------- */