Skip to content

[Due for payment 2025-10-21] [$250] Expense - Paid with bank account system message has different content when copied #71287

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.2.18-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://test-management.browserstack.com/projects/2219752/test-runs/TR-932/folder/13176792/41237184/915649139
Email or phone of affected tester (no customers): applausetester+250902kh@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Admin invites member to workspace.
  • Workspace is set up with business bank account.
  • Member has personal bank account.
  1. Go to staging.new.expensify.com
  2. [Member] Go to workspace chat and create an expense over $100.
  3. [Member] Click Submit on the expense preview.
  4. [Admin] Open the expense report.
  5. [Admin] Click Approve and Pay with business account.
  6. [Admin] Right click on "paid with bank account 1111" system message > Copy to clipboard.
  7. [Admin] Paste the content.

Expected Result:

The copied content will be "paid with bank account 1111".

Actual Result:

The copied content is "paid with bank account via workspace rules"

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021973117417241733683
  • Upwork Job ID: 1973117417241733683
  • Last Price Increase: 2025-09-30
  • Automatic offers:
    • etCoderDysto | Contributor | 108996348
Issue OwnerCurrent Issue Owner: @ishpaul777

Activity

  1. added
    Daily
    Bug
    on Sep 25, 2025
  2. melvin-bot commented on Sep 25, 2025

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. samranahm commented on Sep 25, 2025

    @samranahm
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Expense - Paid with bank account system message has different content when copied

    What is the root cause of that problem?

    The system always used the automatic-payment translation for VBBA due to logic overwrites and irrelevant checks. Specifically, the translationKey for VBBA was being overwritten to automaticallyPaidWithBusinessBankAccount even for manual approval, causing the copied content to include the “via workspace rules” suffix.

    What changes do you think we should make in order to solve the problem?

    We should update the VBBA case to select the correct translation key based only on automaticAction and avoid unnecessary overwrites, so that:

    • Manual approvals use businessBankAccount → plain message, correct for clipboard.

    • Automatic payments use automaticallyPaidWithBusinessBankAccount → includes “via workspace rules” in the UI.

    Updated VBBA case:

    case CONST.IOU.PAYMENT_TYPE.VBBA:
        if (isInvoice) {
            return translateLocal(
                payAsBusiness ? 'iou.settleInvoiceBusiness' : 'iou.settleInvoicePersonal',
                {amount: '', last4Digits}
            );
        }
    
        if (automaticAction) {
            translationKey = 'iou.automaticallyPaidWithBusinessBankAccount';
        } else {
            translationKey = 'iou.businessBankAccount';
        }
        break;

    here

    App/src/libs/ReportUtils.ts

    Lines 9473 to 9483 in ffe38b1

    case CONST.IOU.PAYMENT_TYPE.VBBA:
    if (isInvoice) {
    return translateLocal(payAsBusiness ? 'iou.settleInvoiceBusiness' : 'iou.settleInvoicePersonal', {amount: '', last4Digits});
    }
    translationKey = 'iou.businessBankAccount';
    if (automaticAction && originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
    translationKey = 'iou.automaticallyPaidWithExpensify';
    } else {
    translationKey = 'iou.automaticallyPaidWithBusinessBankAccount';
    }
    break;

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    N/A

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. etCoderDysto commented on Sep 25, 2025

    @etCoderDysto
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Expense - Paid with bank account system message has different content when copied

    What is the root cause of that problem?

    1. We are not checking if automaticAction true before using automaticallyPaidWithBusinessBankAccount translation key. And we ended up using the wrong translation key

      App/src/libs/ReportUtils.ts

      Lines 9478 to 9481 in c92e4da

      if (automaticAction && originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
      translationKey = 'iou.automaticallyPaidWithExpensify';
      } else {
      translationKey = 'iou.automaticallyPaidWithBusinessBankAccount';

    2. We are not passing report as a third param to getIOUReportActionDisplayMessage function.

      const displayMessage = getIOUReportActionDisplayMessage(reportAction, transaction);

      And report?.policyID will be undefined, so reportPolicy will be undefined and last4Digits will be empty string. Therefore the copied content format will be paid with bank account even if fixed the wrong translation key usage issue.

      App/src/libs/ReportUtils.ts

      Lines 9465 to 9466 in c92e4da

      const reportPolicy = allPolicies?.[`${ONYXKEYS.COLLECTION.POLICY}${report?.policyID}`];
      const last4Digits = reportPolicy?.achAccount?.accountNumber?.slice(-4) ?? '';

    What changes do you think we should make in order to solve the problem?

    1. We should check if automaticAction for Expensify and ACH payment type
     if (automaticAction) {
                        if (originalMessage.paymentType === CONST.IOU.PAYMENT_TYPE.EXPENSIFY) {
                            translationKey = 'iou.automaticallyPaidWithExpensify';
                        } else {
                            translationKey = 'iou.automaticallyPaidWithBusinessBankAccount';
                        }
                    }
    
    1. We should pass report param to getIOUReportActionDisplayMessage
                        const displayMessage = getIOUReportActionDisplayMessage(reportAction, transaction, report);
    

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    none

    What alternative solutions did you explore? (Optional)

  5. added
    External
    on Sep 30, 2025
  6. changed the title [-]Expense - Paid with bank account system message has different content when copied[/-] [+][$250] Expense - Paid with bank account system message has different content when copied[/+] on Sep 30, 2025
  7. melvin-bot commented on Sep 30, 2025

    @melvin-bot
  8. added
    Help Wanted
    on Sep 30, 2025
  9. melvin-bot commented on Sep 30, 2025

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @ishpaul777 (External)

  10. mallenexpensify commented on Sep 30, 2025

    @mallenexpensify
    Contributor

    @ishpaul777 , know of an easy way to reproduce this? If so can you attempt reproduction then review the proposals above?
    Thx

  11. 16 remaining items

  12. added
    Awaiting Payment
    on Oct 14, 2025
  13. changed the title [-][$250] Expense - Paid with bank account system message has different content when copied[/-] [+][Due for payment 2025-10-21] [$250] Expense - Paid with bank account system message has different content when copied[/+] on Oct 14, 2025
  14. melvin-bot commented on Oct 14, 2025

    @melvin-bot

    Reviewing label has been removed, please complete the "BugZero Checklist".

  15. removed
    Reviewing
    on Oct 14, 2025
  16. melvin-bot commented on Oct 14, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.30-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2025-10-21. 🎊

    For reference, here are some details about the assignees on this issue:

  17. melvin-bot commented on Oct 14, 2025

    @melvin-bot

    @ishpaul777 @mallenexpensify The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  18. added
    Daily
    and removed
    Weekly
    on Oct 21, 2025
  19. mallenexpensify commented on Oct 21, 2025

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @etCoderDysto paid $250 via Upwork
    Contributor+: @ishpaul777 due $250 via NewDot

    @ishpaul777 plz complete the BZ checklist.

  20. ishpaul777 commented on Oct 29, 2025

    @ishpaul777
    Contributor

    BugZero Checklist:

    • [Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.

      Link to comment: [CP Staging] fix: regressions after pay button standardization #66030 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.

      Link to discussion: no critical, edge case does not block any core user flow

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again. not recomended, one time non recurring bug its fixed now

  21. mallenexpensify commented on Oct 30, 2025

    @mallenexpensify
    Contributor

    All good here, per @ishpaul777's comment above, it doesn't look like we need/want a test case for this.

  22. garrettmknight commented on Nov 11, 2025

    @garrettmknight
    Contributor

    $250 approved for @ishpaul777

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions