From c38e53d1c6699a7fe88a580a8d007c08bd531837 Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 24 Oct 2024 16:41:43 -0500 Subject: [PATCH] Website: Add organization to questionnaire responses (#23167) Closes: https://github.com/fleetdm/confidential/issues/8238 Changes: - Updated save-questionnaire-progress to prepend a "org-acording-to-fleetdm.com" response to the questionnaire answers reported to the CRM --- website/api/controllers/save-questionnaire-progress.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/api/controllers/save-questionnaire-progress.js b/website/api/controllers/save-questionnaire-progress.js index 2571eb1fd1..2c4182df47 100644 --- a/website/api/controllers/save-questionnaire-progress.js +++ b/website/api/controllers/save-questionnaire-progress.js @@ -216,6 +216,9 @@ module.exports = { } catch(err){ sails.log.warn(`When converting a user's (email: ${this.req.me.emailAddress}) getStartedQuestionnaireAnswers to a formatted string to send to the CRM, and error occurred`, err); } + // Prepend the user's reported organization to the questionnaireProgressAsAFormattedString + questionnaireProgressAsAFormattedString = `organization-acording-to-fleetdm.com: ${this.req.me.organization}\n` + questionnaireProgressAsAFormattedString; + // Create a dictionary of values to send to the CRM for this user. let contactInformation = { emailAddress: this.req.me.emailAddress,