Skip to content

Commit a5184e4

Browse files
baruchiroelsmr
andauthored
feat(ClickUp Node): Add subtasks and markdown support to the get task operation (#16811)
Co-authored-by: Elias Meire <[email protected]>
1 parent ddc4c0b commit a5184e4

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

packages/nodes-base/nodes/ClickUp/ClickUp.node.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import moment from 'moment-timezone';
22
import type {
3-
IExecuteFunctions,
43
IDataObject,
4+
IExecuteFunctions,
55
ILoadOptionsFunctions,
66
INodeExecutionData,
77
INodePropertyOptions,
@@ -992,7 +992,19 @@ export class ClickUp implements INodeType {
992992
}
993993
if (operation === 'get') {
994994
const taskId = this.getNodeParameter('id', i) as string;
995-
responseData = await clickupApiRequest.call(this, 'GET', `/task/${taskId}`);
995+
const includeSubtasks = this.getNodeParameter('includeSubtasks', i, false) as boolean;
996+
if (includeSubtasks) {
997+
qs.include_subtasks = true;
998+
}
999+
const includeMarkdownDescription = this.getNodeParameter(
1000+
'includeMarkdownDescription',
1001+
i,
1002+
false,
1003+
) as boolean;
1004+
if (includeMarkdownDescription) {
1005+
qs.include_markdown_description = true;
1006+
}
1007+
responseData = await clickupApiRequest.call(this, 'GET', `/task/${taskId}`, {}, qs);
9961008
}
9971009
if (operation === 'getAll') {
9981010
const returnAll = this.getNodeParameter('returnAll', i);

packages/nodes-base/nodes/ClickUp/TaskDescription.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,33 @@ export const taskFields: INodeProperties[] = [
457457
},
458458
},
459459
},
460+
{
461+
displayName: 'Include Subtasks',
462+
name: 'includeSubtasks',
463+
type: 'boolean',
464+
default: false,
465+
description: 'Whether to also fetch and include subtasks for this task',
466+
displayOptions: {
467+
show: {
468+
resource: ['task'],
469+
operation: ['get'],
470+
},
471+
},
472+
},
473+
{
474+
displayName: 'Include Markdown Description',
475+
name: 'includeMarkdownDescription',
476+
type: 'boolean',
477+
default: false,
478+
description:
479+
'Whether to include the markdown_description field in the response. This is important for preserving links in the description.',
480+
displayOptions: {
481+
show: {
482+
resource: ['task'],
483+
operation: ['get'],
484+
},
485+
},
486+
},
460487

461488
/* -------------------------------------------------------------------------- */
462489
/* task:getAll */

0 commit comments

Comments
 (0)