email-sender-variable-business-user-fallback
Email Sender Variable → Business User Fallback
Covers the class of bugs where {{current.sign.sender.sender_name}} or {{current.sign.sender.sender_email}} (and similar sign.sender.* variables) resolve to the Business User's details instead of the actual user who triggered the action.
Root Cause
GetSignContextUseCase._get_sender_details() determines the sender for email template variable resolution. It reads sent_for_signature_by_org_user from ContractSignatureSetup.
Problem: For "Send to Counterparty" (pre-signing flow), the contract hasn't been formally sent for signature yet, so ContractSignatureSetup does not exist. The code falls back to the Business User.
The current_logged_in_user is not passed into _get_sender_details() in this flow, so there is no way for it to know who actually clicked "Send."
This is WAI for
sign.sender.*variables — they are designed to capture the "sent for signature" sender. The issue is that no variable currently exists for "current acting user." Adding one (e.g.,current.sender) requires a feature enhancement (tracked as SPD-42062, currently "Mitigated").