Skip to content

Commit

Permalink
[communitybridge#4225,communitybridge#4228] Bug/Incorrect date format…
Browse files Browse the repository at this point in the history
… for ccla

- Resolved wrong date_modified format for ccla signature
- Handled none values for ecla signature_reference_name attribute

Signed-off-by: Harold Wanyama <[email protected]>
  • Loading branch information
nickmango committed Feb 6, 2024
1 parent b2974b1 commit b734abb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cla-backend-go/v2/sign/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,11 @@ func (s *service) SignedCorporateCallback(ctx context.Context, payload []byte, c
// Update the signature status if changed
status := info.EnvelopeStatus.Status
if status == DocusignCompleted && !signature.SignatureSigned {
_, currentTime := utils.CurrentTime()
updates := map[string]interface{}{
"signature_signed": true,
"date_modified": time.Now().String(),
"signed_on": time.Now().String(),
"date_modified": currentTime,
"signed_on": currentTime,
}

userSignedDate := info.EnvelopeStatus.RecipientStatuses[0].Signed
Expand Down
4 changes: 3 additions & 1 deletion cla-backend/cla/models/docusign_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,6 @@ def _save_employee_signature(self,signature):
'signature_document_major_version': {'N': str(signature.get_signature_document_major_version())},
'signature_reference_id': {'S': signature.get_signature_reference_id()},
'signature_reference_type': {'S': signature.get_signature_reference_type()},
'signature_reference_name': {'S': signature.get_signature_reference_name()},
'signature_type': {'S': signature.get_signature_type()},
'signature_signed': {'BOOL': signature.get_signature_signed()},
'signature_approved': {'BOOL': signature.get_signature_approved()},
Expand All @@ -789,6 +788,9 @@ def _save_employee_signature(self,signature):

if signature.get_signature_return_url() is not None:
item['signature_return_url'] = {'S': signature.get_signature_return_url()}

if signature.get_signature_reference_name() is not None:
item['signature_reference_name'] = {'S': signature.get_signature_reference_name()}

try:
self.dynamo_client.put_item(TableName=signature_table, Item=item)
Expand Down

0 comments on commit b734abb

Please sign in to comment.