mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08:00
⚡ added forderless list support
This commit is contained in:
parent
6336adec8b
commit
1d9685ea4c
|
@ -125,6 +125,22 @@ export class ClickUp implements INodeType {
|
||||||
}
|
}
|
||||||
return returnData;
|
return returnData;
|
||||||
},
|
},
|
||||||
|
// Get all the available lists without a folder to display them to user so that he can
|
||||||
|
// select them easily
|
||||||
|
async getFolderlessLists(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
|
const spaceId = this.getCurrentNodeParameter('space') as string;
|
||||||
|
const returnData: INodePropertyOptions[] = [];
|
||||||
|
const { lists } = await clickupApiRequest.call(this, 'GET', `/space/${spaceId}/list`);
|
||||||
|
for (const list of lists) {
|
||||||
|
const listName = list.name;
|
||||||
|
const listId = list.id;
|
||||||
|
returnData.push({
|
||||||
|
name: listName,
|
||||||
|
value: listId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return returnData;
|
||||||
|
},
|
||||||
// Get all the available assignees to display them to user so that he can
|
// Get all the available assignees to display them to user so that he can
|
||||||
// select them easily
|
// select them easily
|
||||||
async getAssignees(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
async getAssignees(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||||
|
|
|
@ -87,6 +87,23 @@ export const taskFields = [
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Forderless List',
|
||||||
|
name: 'fonderlessList',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'task',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'create',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Folder',
|
displayName: 'Folder',
|
||||||
name: 'folder',
|
name: 'folder',
|
||||||
|
@ -100,13 +117,16 @@ export const taskFields = [
|
||||||
operation: [
|
operation: [
|
||||||
'create',
|
'create',
|
||||||
],
|
],
|
||||||
|
fonderlessList: [
|
||||||
|
false,
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
loadOptionsMethod: 'getFolders',
|
loadOptionsMethod: 'getFolders',
|
||||||
loadOptionsDependsOn: [
|
loadOptionsDependsOn: [
|
||||||
'space',
|
'space',
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
@ -123,6 +143,35 @@ export const taskFields = [
|
||||||
operation: [
|
operation: [
|
||||||
'create',
|
'create',
|
||||||
],
|
],
|
||||||
|
fonderlessList: [
|
||||||
|
true,
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
typeOptions: {
|
||||||
|
loadOptionsMethod: 'getFolderlessLists',
|
||||||
|
loadOptionsDependsOn: [
|
||||||
|
'space',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'List',
|
||||||
|
name: 'list',
|
||||||
|
type: 'options',
|
||||||
|
default: '',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: [
|
||||||
|
'task',
|
||||||
|
],
|
||||||
|
operation: [
|
||||||
|
'create',
|
||||||
|
],
|
||||||
|
fonderlessList: [
|
||||||
|
false,
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
typeOptions: {
|
typeOptions: {
|
||||||
|
|
Loading…
Reference in a new issue