mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
Add SpaceID in Create Work Item for Kitemaker
This commit is contained in:
@@ -119,10 +119,16 @@ export class Kitemaker implements INodeType {
|
||||
},
|
||||
|
||||
async getStatuses(this: ILoadOptionsFunctions) {
|
||||
const spaceId = this.getNodeParameter('spaceId', 0) as string;
|
||||
if (!spaceId.length) {
|
||||
throw new Error('Please choose a space to set for the work item to create.');
|
||||
}
|
||||
|
||||
const responseData = await kitemakerRequest.call(this, { query: getStatuses });
|
||||
const { data: { organization: { spaces } } } = responseData;
|
||||
const space = spaces.find((e: { [x: string]: string; }) => e.id == spaceId)
|
||||
|
||||
return createLoadOptions(spaces[0].statuses);
|
||||
return createLoadOptions(space.statuses);
|
||||
},
|
||||
|
||||
async getUsers(this: ILoadOptionsFunctions) {
|
||||
|
||||
Reference in New Issue
Block a user