Skip to content

Commit

Permalink
[communitybridge#3498]Bug/CLA Manager Email
Browse files Browse the repository at this point in the history
- Updated email params on cla group for cla managers

Signed-off-by: Nick Mango <wanyaland+nickmango@gmail.com>
  • Loading branch information
nickmango committed Dec 4, 2024
1 parent 9586943 commit ceb204f
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 ceb204f

Please sign in to comment.