From a946ead46efecf6864505d465b0369ed67a1f2c7 Mon Sep 17 00:00:00 2001 From: pemontto <939704+pemontto@users.noreply.github.com> Date: Wed, 5 Jun 2024 15:26:15 +0100 Subject: [PATCH] fix(Jira Software Node): Fix comments limit and add sorting (#9634) --- .../nodes/Jira/IssueCommentDescription.ts | 17 +++++++++++++++++ packages/nodes-base/nodes/Jira/Jira.node.ts | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Jira/IssueCommentDescription.ts b/packages/nodes-base/nodes/Jira/IssueCommentDescription.ts index a6956b2f645a1..fdcd699878423 100644 --- a/packages/nodes-base/nodes/Jira/IssueCommentDescription.ts +++ b/packages/nodes-base/nodes/Jira/IssueCommentDescription.ts @@ -286,6 +286,23 @@ export const issueCommentFields: INodeProperties[] = [ description: 'Use expand to include additional information about comments in the response. This parameter accepts Rendered Body, which returns the comment body rendered in HTML.', }, + { + displayName: 'Order By', + name: 'orderBy', + type: 'options', + options: [ + { + name: 'Created Ascending', + value: '+created', + }, + { + name: 'Created Descending', + value: '-created', + }, + ], + default: 'created_asc', + description: 'Order comments by the created date', + }, ], }, diff --git a/packages/nodes-base/nodes/Jira/Jira.node.ts b/packages/nodes-base/nodes/Jira/Jira.node.ts index c66e194727539..ba4b766d1e995 100644 --- a/packages/nodes-base/nodes/Jira/Jira.node.ts +++ b/packages/nodes-base/nodes/Jira/Jira.node.ts @@ -1280,7 +1280,7 @@ export class Jira implements INodeType { ); } else { const limit = this.getNodeParameter('limit', i); - body.maxResults = limit; + qs.maxResults = limit; responseData = await jiraSoftwareCloudApiRequest.call( this, `/api/${apiVersion}/issue/${issueKey}/comment`,