Skip to content

Commit

Permalink
Merge pull request #4498 from nickmango/bug/cla-mgr-email
Browse files Browse the repository at this point in the history
[#3498]Bug/CLA Manager Email
  • Loading branch information
nickmango authored Dec 4, 2024
2 parents 9586943 + ceb204f commit 8467aec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cla-backend-go/cla_manager/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func sendClaManagerAddedEmailToCLAManagers(emailSvc emails.EmailTemplateService,
// subject string, body string, recipients []string
subject := fmt.Sprintf("EasyCLA: CLA Manager Added Notice for %s", projectName)
recipients := []string{emailParams.RecipientAddress}
body, err := emails.RenderClaManagerAddedToCLAManagersTemplate(emailSvc, claGroupModel.Version, claGroupModel.ProjectExternalID, emailParams)
body, err := emails.RenderClaManagerAddedToCLAManagersTemplate(emailSvc, claGroupModel.Version, projectName, emailParams)
if err != nil {
log.Warnf("email template render : %s failed : %v", emails.ClaManagerAddedToCLAManagersTemplate, err)
return
Expand Down
13 changes: 8 additions & 5 deletions cla-backend-go/emails/cla_manager_templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,15 @@ list of company’s CLA Managers for CLA Group {{.CLAGroupName}}.</p>
)

// RenderClaManagerAddedToCLAManagersTemplate renders the ClaManagerAddedToCLAManagersTemplate
func RenderClaManagerAddedToCLAManagersTemplate(svc EmailTemplateService, claGroupModelVersion, projectSFID string, params ClaManagerAddedToCLAManagersTemplateParams) (string, error) {
claGroupParams, err := svc.GetCLAGroupTemplateParamsFromProjectSFID(claGroupModelVersion, projectSFID)
if err != nil {
return "", err
func RenderClaManagerAddedToCLAManagersTemplate(svc EmailTemplateService, claGroupModelVersion, claGroupName string, params ClaManagerAddedToCLAManagersTemplateParams) (string, error) {
// claGroupParams, err := svc.GetCLAGroupTemplateParamsFromProjectSFID(claGroupModelVersion, projectSFID)
// if err != nil {
// return "", err
// }
// params.CLAGroupTemplateParams = claGroupParams
params.CLAGroupTemplateParams = CLAGroupTemplateParams{
CLAGroupName: claGroupName,
}
params.CLAGroupTemplateParams = claGroupParams

return RenderTemplate(claGroupModelVersion, ClaManagerAddedToCLAManagersTemplateName, ClaManagerAddedToCLAManagersTemplate, params)
}
Expand Down

0 comments on commit 8467aec

Please sign in to comment.