mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Fix loading of projects for hosted Jira
This commit is contained in:
parent
1a63af460a
commit
98ac9d93bc
|
@ -81,6 +81,9 @@ export const issueFields = [
|
|||
},
|
||||
typeOptions: {
|
||||
loadOptionsMethod: 'getProjects',
|
||||
loadOptionsDependsOn: [
|
||||
'jiraVersion',
|
||||
],
|
||||
},
|
||||
description: 'Project',
|
||||
},
|
||||
|
|
|
@ -111,9 +111,10 @@ export class JiraSoftwareCloud implements INodeType {
|
|||
// select them easily
|
||||
async getProjects(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const jiraCloudCredentials = this.getCredentials('jiraSoftwareCloudApi');
|
||||
const jiraVersion = this.getCurrentNodeParameter('jiraVersion') as string;
|
||||
|
||||
let endpoint = '/project/search';
|
||||
if (jiraCloudCredentials === undefined) {
|
||||
if (jiraVersion === 'server') {
|
||||
endpoint = '/project';
|
||||
}
|
||||
let projects = await jiraSoftwareCloudApiRequest.call(this, endpoint, 'GET');
|
||||
|
|
Loading…
Reference in a new issue