mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
⚡ Fix loading of projects for hosted Jira
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user