From 73ae9e2dfe59ccc7da6d9b5f9d5725c82fea9d97 Mon Sep 17 00:00:00 2001 From: Harold Wanyama Date: Fri, 1 Dec 2023 18:53:23 +0300 Subject: [PATCH] Feature/Docusign prefill - Prefilled document with full_name and email Signed-off-by: Harold Wanyama --- cla-backend-go/v2/sign/service.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cla-backend-go/v2/sign/service.go b/cla-backend-go/v2/sign/service.go index 40ba46782..85a817c29 100644 --- a/cla-backend-go/v2/sign/service.go +++ b/cla-backend-go/v2/sign/service.go @@ -1401,6 +1401,9 @@ func getTabsFromDocument(document *v1Models.ClaGroupDocument, documentID string, if defaultValues != nil { if value, ok := defaultValues[tab.DocumentTabID].(string); ok { args.Value = value + log.WithFields(f).Debugf("setting default value for tab: %s, value: %s", tab.DocumentTabID, value) + } else { + log.WithFields(f).Debugf("no default value found for tab: %s", tab.DocumentTabID) } } @@ -1500,14 +1503,14 @@ func (s *service) createDefaultIndividualValues(user *v1Models.User, preferredEm if user != nil { if user.Username != "" { - defaultValues["user_name"] = user.Username - defaultValues["public_name"] = user.Username + defaultValues["sign"] = user.Username + defaultValues["full_name"] = user.Username } } if preferredEmail != "" { if utils.StringInSlice(preferredEmail, user.Emails) || user.LfEmail == strfmt.Email(preferredEmail) { - defaultValues["user_email"] = preferredEmail + defaultValues["email"] = preferredEmail } }