From 47ad638d4392c5f00625dd8490d8e660297a0d68 Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Thu, 30 Nov 2023 09:00:19 +0000 Subject: [PATCH] feat(BambooHR Node): Add support for Only Current on company reports --- .../BambooHr/v1/actions/companyReport/get/description.ts | 7 +++++++ .../nodes/BambooHr/v1/actions/companyReport/get/execute.ts | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/description.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/description.ts index 3c0aa6475354e..e80ae80d99d37 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/description.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/description.ts @@ -89,6 +89,13 @@ export const companyReportGetDescription: INodeProperties[] = [ default: true, description: 'Whether to apply the standard duplicate field filtering or not', }, + { + displayName: 'Only Current', + name: 'onlyCurrent', + type: 'boolean', + default: true, + description: 'Whether to hide future dated values from the history table fields or not', + }, ], }, ]; diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/execute.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/execute.ts index d87f49b3f9117..c7ddc01b64928 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/execute.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/companyReport/get/execute.ts @@ -11,9 +11,10 @@ export async function get(this: IExecuteFunctions, index: number) { const reportId = this.getNodeParameter('reportId', index) as string; const format = this.getNodeParameter('format', 0) as string; const fd = this.getNodeParameter('options.fd', index, true) as boolean; + const onlyCurrent = this.getNodeParameter('options.onlyCurrent', index, true) as boolean; //endpoint - const endpoint = `reports/${reportId}/?format=${format}&fd=${fd}`; + const endpoint = `reports/${reportId}/?format=${format}&fd=${fd}&onlyCurrent=${onlyCurrent}`; if (format === 'JSON') { const responseData = await apiRequest.call(