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:
Baruch Odem (Rothkoff)
2025-07-31 13:48:56 +03:00
committed by GitHub
parent ddc4c0b7d9
commit a5184e4895
2 changed files with 41 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import moment from 'moment-timezone';
import type {
IExecuteFunctions,
IDataObject,
IExecuteFunctions,
ILoadOptionsFunctions,
INodeExecutionData,
INodePropertyOptions,
@@ -992,7 +992,19 @@ export class ClickUp implements INodeType {
}
if (operation === 'get') {
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') {
const returnAll = this.getNodeParameter('returnAll', i);

View File

@@ -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 */