Skip to content

Commit

Permalink
[communitybridge#4247]Bug/Docusign CCLA callback
Browse files Browse the repository at this point in the history
- Resolved issue for signatory signed callback

Signed-off-by: Harold Wanyama <[email protected]>
  • Loading branch information
nickmango committed Feb 27, 2024
1 parent 2f29b52 commit 269e551
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cla-backend-go/v2/sign/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1058,16 +1058,18 @@ func (s *service) SignedCorporateCallback(ctx context.Context, payload []byte, c
clientUserID := info.EnvelopeStatus.RecipientStatuses[0].ClientUserId
if clientUserID == "" {
approved := true
signatures, sigErr := s.signatureService.GetCorporateSignatures(ctx, companyID, projectID, &approved, nil)
var sigErr error
signature, sigErr = s.signatureService.GetCorporateSignature(ctx, projectID, companyID, &approved, nil)
// signatures, sigErr := s.signatureService.GetCorporateSignatures(ctx, companyID, projectID, &approved, nil)
if sigErr != nil {
log.WithFields(f).WithError(sigErr).Warnf("unable to lookup corporate signatures by company ID: %s, project ID: %s", companyID, projectID)
return sigErr
}
if len(signatures) == 0 {
log.WithFields(f).WithError(err).Warnf("unable to lookup corporate signatures by company ID: %s, project ID: %s - not found", companyID, projectID)
return errors.New("unable to lookup corporate signatures by company ID - not found")
}
signature = getLatestSignature(signatures)
// if len(signatures) == 0 {
// log.WithFields(f).WithError(err).Warnf("unable to lookup corporate signatures by company ID: %s, project ID: %s - not found", companyID, projectID)
// return errors.New("unable to lookup corporate signatures by company ID - not found")
// }
// signature = getLatestSignature(signatures)
log.WithFields(f).Debugf("signature: %+v", signature)
signatureID = signature.SignatureID
} else {
Expand Down Expand Up @@ -1170,6 +1172,7 @@ func (s *service) SignedCorporateCallback(ctx context.Context, payload []byte, c
SignatoryName: getUserName(user),
},
CLAGroupID: projectID,
UserID: user.UserID,
})

return nil
Expand Down

0 comments on commit 269e551

Please sign in to comment.