Skip to content

Commit

Permalink
Merge pull request #4203 from nickmango/feature/docsign-prefill
Browse files Browse the repository at this point in the history
Feature/Docusign prefill
  • Loading branch information
nickmango authored Dec 1, 2023
2 parents 99dc361 + 73ae9e2 commit 1ef6255
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cla-backend-go/v2/sign/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -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
}
}

Expand Down

0 comments on commit 1ef6255

Please sign in to comment.