Skip to content

[Due for payment 2026-04-14] Expense - Per attendee amount on the table does not show negative sign #87006

Closed

Description

@mitarachim

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.3.52-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #85332
Email or phone of affected tester (no customers): sdiodjoisjnodisj@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.2 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Rules are enabled.
  • Attendee tracking is enabled in Rules.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create two expenses with negative amount and at least two attendees.
  4. Open the expense report.

Expected Result:

Per attendee amount on the table will show negative sign.

Actual Result:

Per attendee amount on the table does not show negative sign.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7120172_1775160983671.6.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    DeployBlockerIndicates it should block deploying the API
    on Apr 2, 2026
  2. melvin-bot commented on Apr 2, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #85332

  3. melvin-bot commented on Apr 2, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  4. github-actions commented on Apr 2, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  5. MelvinBot commented on Apr 2, 2026

    @MelvinBot
    Contributor

    Proposal

    What is the root cause of that problem?

    In src/components/TransactionItemRow/index.tsx:283, getAmount(transactionItem) is called without passing isFromExpenseReport, so it defaults to false. This causes getAmount in TransactionUtils/index.ts:956-962 to hit the Math.abs() branch, which strips the negative sign from the amount before dividing by attendee count.

    The main total column correctly preserves the sign because it calls isExpenseReport(transactionItem.report) (e.g., line 591), but the per-attendee calculation at line 283 omits this.

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

    Pass the isFromExpenseReport flag when calling getAmount in the totalPerAttendee calculation at TransactionItemRow/index.tsx:283:

    Change getAmount(transactionItem) to getAmount(transactionItem, isExpenseReport(transactionItem.report)).

    isExpenseReport is already imported and used elsewhere in the same file, so no new imports are needed.

    What alternative solutions did you explore? (Optional)

    Could use the allowNegative parameter instead (getAmount(transactionItem, false, false, true)), but passing isFromExpenseReport is more correct — it mirrors how the total amount column handles this and ensures proper sign handling for expense reports specifically.


    Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.

  6. justinpersaud commented on Apr 2, 2026

    @justinpersaud
    Contributor

    @MelvinBot is it normal to allow negative expenses?

  7. justinpersaud commented on Apr 2, 2026

    @justinpersaud
    Contributor

    I am demoting this because this is a newer feature

  8. 17 remaining items

  9. melvin-bot commented on Apr 7, 2026

    @melvin-bot

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

  10. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.53-7 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 2026-04-14. 🎊

  11. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    @justinpersaud 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]

  12. melvin-bot commented on Apr 7, 2026

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (Awaiting Payment)

  13. melvin-bot commented on Apr 14, 2026

    @melvin-bot

    Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

  14. mallenexpensify commented on Apr 16, 2026

    @mallenexpensify
    Contributor
  15. nkdengineer commented on Apr 16, 2026

    @nkdengineer
    Contributor

    @mallenexpensify It's regression. We can close this out.

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions