From f2c3294a40aa784c056e8d92b0bd481bd4792c7f Mon Sep 17 00:00:00 2001 From: Nick Mango Date: Wed, 27 Nov 2024 20:35:50 +0300 Subject: [PATCH] [#3498] Project Name - Used CLA Group Name in the add/remove CLA Manager notification email Signed-off-by: Nick Mango --- .../emails/cla_manager_templates.go | 20 +++++++++---------- .../emails/cla_manager_templates_test.go | 14 ++++++------- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/cla-backend-go/emails/cla_manager_templates.go b/cla-backend-go/emails/cla_manager_templates.go index 4c7b85e45..085047ccd 100644 --- a/cla-backend-go/emails/cla_manager_templates.go +++ b/cla-backend-go/emails/cla_manager_templates.go @@ -218,12 +218,12 @@ const ( //ClaManagerAddedEToUserTemplate email template for cla manager v2 ClaManagerAddedEToUserTemplate = `

Hello {{.RecipientName}},

-

This is a notification email from EasyCLA regarding the project {{.Project.ExternalProjectName}} and CLA Group {{.CLAGroupName}}.

-

You have been added as a CLA Manager for the organization {{.CompanyName}} and the project {{.Project.ExternalProjectName}}. This means that you can now maintain the -list of employees allowed to contribute to the project {{.Project.ExternalProjectName}} on behalf of your company, as well as view and manage the list of your +

This is a notification email from EasyCLA regarding the CLA Group {{.CLAGroupName}}.

+

You have been added as a CLA Manager for the organization {{.CompanyName}} and the CLAGroup {{.CLAGroupName}}. This means that you can now maintain the +list of employees allowed to contribute to the CLA Group {{.CLAGroupName}} on behalf of your company, as well as view and manage the list of your company’s CLA Managers for the CLA Group {{.CLAGroupName}}.

To get started, please log into the EasyCLA Corporate Console, and select your -company and then the project {{.Project.ExternalProjectName}}. From here you will be able to edit the list of approved employees and CLA Managers.

+company and then the project {{.CLAGroupName}}. From here you will be able to edit the list of approved employees and CLA Managers.

` ) @@ -252,10 +252,10 @@ const ( // ClaManagerAddedToCLAManagersTemplate is email template for ClaManagerAddedToCLAManagersTemplate = `

Hello {{.RecipientName}},

-

This is a notification email from EasyCLA regarding the project {{.Project.ExternalProjectName}} associated with the CLA Group {{.CLAGroupName}}.

-

The following user has been added as a CLA Manager from {{.CompanyName}} for the project {{.Project.ExternalProjectName}}. This means that they can now -maintain the list of employees allowed to contribute to {{.Project.ExternalProjectName}} on behalf of your company, as well as view and manage the -list of company’s CLA Managers for {{.Project.ExternalProjectName}}.

+

This is a notification email from EasyCLA regarding the CLA Group {{.CLAGroupName}}.

+

The following user has been added as a CLA Manager from {{.CompanyName}} for the CLA Group {{.CLAGroupName}}. This means that they can now +maintain the list of employees allowed to contribute to {{.CLAGroupName}} on behalf of your company, as well as view and manage the +list of company’s CLA Managers for CLA Group {{.CLAGroupName}}.

@@ -287,8 +287,8 @@ const ( // ClaManagerDeletedToCLAManagersTemplate is template for ClaManagerDeletedToCLAManagersTemplate = `

Hello {{.RecipientName}},

-

This is a notification email from EasyCLA regarding the project {{.Project.ExternalProjectName}}.

-

{{.Name}} ({{.Email}}) has been removed as a CLA Manager from {{.CompanyName}} for the project {{.Project.ExternalProjectName}}.

+

This is a notification email from EasyCLA regarding the CLA Group {{.CLAGroupName}}.

+

{{.Name}} ({{.Email}}) has been removed as a CLA Manager from {{.CompanyName}} for CLA Group {{.CLAGroupName}}.

` ) diff --git a/cla-backend-go/emails/cla_manager_templates_test.go b/cla-backend-go/emails/cla_manager_templates_test.go index f401af7dc..77927b784 100644 --- a/cla-backend-go/emails/cla_manager_templates_test.go +++ b/cla-backend-go/emails/cla_manager_templates_test.go @@ -198,9 +198,9 @@ func TestClaManagerAddedEToUserTemplate(t *testing.T) { params) assert.NoError(t, err) assert.Contains(t, result, "Hello JohnsClaManager") - assert.Contains(t, result, "regarding the project JohnsProjectExternal") - assert.Contains(t, result, "CLA Manager for the organization JohnsCompany and the project JohnsProjectExternal") - assert.Contains(t, result, "allowed to contribute to the project JohnsProjectExternal") + assert.Contains(t, result, "the CLA Group JohnsProject.") + assert.Contains(t, result, "organization JohnsCompany and the CLAGroup JohnsProject") + assert.Contains(t, result, "allowed to contribute to the CLA Group JohnsProject") assert.Contains(t, result, "CLA Managers for the CLA Group JohnsProject") assert.Contains(t, result, "") assert.Contains(t, result, "and then the project JohnsProject") @@ -224,10 +224,9 @@ func TestClaManagerAddedToCLAManagersTemplate(t *testing.T) { params) assert.NoError(t, err) assert.Contains(t, result, "Hello JohnsClaManager") - assert.Contains(t, result, "regarding the project JohnsProjectExternal associated with the CLA Group JohnsProject") - assert.Contains(t, result, "CLA Manager from JohnsCompany for the project JohnsProjectExternal") - assert.Contains(t, result, "contribute to JohnsProjectExternal") - assert.Contains(t, result, "CLA Managers for JohnsProjectExternal") + assert.Contains(t, result, "regarding the CLA Group JohnsProject") + assert.Contains(t, result, "contribute to JohnsProject") + assert.Contains(t, result, "CLA Managers for CLA Group JohnsProject") assert.Contains(t, result, "
  • John (john@example.com)
  • ") } @@ -250,7 +249,6 @@ func TestClaManagerDeletedToCLAManagersTemplate(t *testing.T) { params) assert.NoError(t, err) assert.Contains(t, result, "Hello JohnsClaManager") - assert.Contains(t, result, "regarding the project JohnsProject") assert.Contains(t, result, "John (john@example.com) has been removed") }