mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(ClickUp Node): Add subtasks and markdown support to the get task operation (#16811)
Co-authored-by: Elias Meire <elias@meire.dev>
This commit is contained in:
committed by
GitHub
parent
ddc4c0b7d9
commit
a5184e4895
@@ -1,7 +1,7 @@
|
|||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
import type {
|
import type {
|
||||||
IExecuteFunctions,
|
|
||||||
IDataObject,
|
IDataObject,
|
||||||
|
IExecuteFunctions,
|
||||||
ILoadOptionsFunctions,
|
ILoadOptionsFunctions,
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodePropertyOptions,
|
INodePropertyOptions,
|
||||||
@@ -992,7 +992,19 @@ export class ClickUp implements INodeType {
|
|||||||
}
|
}
|
||||||
if (operation === 'get') {
|
if (operation === 'get') {
|
||||||
const taskId = this.getNodeParameter('id', i) as string;
|
const taskId = this.getNodeParameter('id', i) as string;
|
||||||
responseData = await clickupApiRequest.call(this, 'GET', `/task/${taskId}`);
|
const includeSubtasks = this.getNodeParameter('includeSubtasks', i, false) as boolean;
|
||||||
|
if (includeSubtasks) {
|
||||||
|
qs.include_subtasks = true;
|
||||||
|
}
|
||||||
|
const includeMarkdownDescription = this.getNodeParameter(
|
||||||
|
'includeMarkdownDescription',
|
||||||
|
i,
|
||||||
|
false,
|
||||||
|
) as boolean;
|
||||||
|
if (includeMarkdownDescription) {
|
||||||
|
qs.include_markdown_description = true;
|
||||||
|
}
|
||||||
|
responseData = await clickupApiRequest.call(this, 'GET', `/task/${taskId}`, {}, qs);
|
||||||
}
|
}
|
||||||
if (operation === 'getAll') {
|
if (operation === 'getAll') {
|
||||||
const returnAll = this.getNodeParameter('returnAll', i);
|
const returnAll = this.getNodeParameter('returnAll', i);
|
||||||
|
|||||||
@@ -457,6 +457,33 @@ export const taskFields: INodeProperties[] = [
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Include Subtasks',
|
||||||
|
name: 'includeSubtasks',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
description: 'Whether to also fetch and include subtasks for this task',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: ['task'],
|
||||||
|
operation: ['get'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Include Markdown Description',
|
||||||
|
name: 'includeMarkdownDescription',
|
||||||
|
type: 'boolean',
|
||||||
|
default: false,
|
||||||
|
description:
|
||||||
|
'Whether to include the markdown_description field in the response. This is important for preserving links in the description.',
|
||||||
|
displayOptions: {
|
||||||
|
show: {
|
||||||
|
resource: ['task'],
|
||||||
|
operation: ['get'],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* task:getAll */
|
/* task:getAll */
|
||||||
|
|||||||
Reference in New Issue
Block a user