From 0b1b4baaabc11890b9371c6cbb02e6344f180b43 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Tue, 19 Oct 2021 00:02:52 -0400 Subject: [PATCH] :sparkles: Add option to user_id parameter - Pipedrive (#2337) * Adjust User Id field to become mandatory in getAll Ativities Include Stage order in title Selection * :zap: Small change to #2322 Co-authored-by: Rodrigo Correia --- packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index 175d628760..c0956012d1 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -3928,10 +3928,11 @@ export class Pipedrive implements INodeType { return sortOptionParameters(returnData); }, - // Get all Organizations to display them to user so that he can + // Get all Users to display them to user so that he can // select them easily async getUserIds(this: ILoadOptionsFunctions): Promise { const returnData: INodePropertyOptions[] = []; + const resource = this.getCurrentNodeParameter('resource'); const { data } = await pipedriveApiRequest.call(this, 'GET', '/users', {}); for (const user of data) { if (user.active_flag === true) { @@ -3942,6 +3943,13 @@ export class Pipedrive implements INodeType { } } + if(resource === 'activity'){ + returnData.push({ + name: 'All Users', + value: 0, + }); + } + return sortOptionParameters(returnData); }, // Get all Deals to display them to user so that he can