Repository navigation
Description
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.74-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: #75934
Email or phone of affected tester (no customers): ibellicotest+2186@gmail.com
Issue reported by: Applause - Internal Team
Action Performed:
Prerequisite: Have two accounts opened on two different devices or environments
Prerequisite 2: User A has at least one workspace
- Open the staging.new.expensify.com website
- Open any workspace chat
- Click on the chat header and select Members
- Invite User B as a member
- Switch to User B's account
- Open the same workspace chat
- Switch back to User A's account
- Create three manual expenses with negative amount in the workspace chat
- Switch again to User B's account
- Note that the LHN subtitle displays the "-workspaceName- owes -amount-" as the last message but it is shown with positive amount
- Reopen chat and right-click on the placeholder and click "Copy message"
- Paste the message on the composer
13.Note that the copied message is in the format: "-workspaceName- owes -amount-" but it is also shown with positive amount - Open report and return to chat
- Right click on preview, and select "Copy Message" again
- Paste the message on composer
- Note that now, amount is correctly displayed as negative
- Note that amount in LHN is also correctly displayed now
Expected Result:
When admin creates expenses with negative amount, preview on LHN and message copied from report preview, should be displayed as negative on member´s side too
Actual Result:
When adming creates expenses with negative amount, preview on LHN and message copied from report preview, are shown with positive amount on member´s side
Preview and message copied, show correct amount after report is opened for the first time. (Steps 20 and 23 from PR are failing)
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
Bug7025138_1765300102982.Negative.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022001206540815244657
- Upwork Job ID: 2001206540815244657
- Last Price Increase: 2026-01-21
Issue Owner
Current Issue Owner: @shubham1206agraMetadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Dec 9, 2025
Triggered auto assignment to @greg-schroeder (
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.SAYAN02-DEV commentedon Dec 9, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
When an admin creates expenses with negative amounts in a workspace chat, the LHN (Left Hand Navigation) subtitle and copied message display the amount as positive on the member's side until they open the report for the first time. After opening the report, the amounts correctly display as negative.
What is the root cause of that problem?
When displaying preview BEFORE report is loaded
App/src/libs/ReportUtils.ts
Lines 5325 to 5327 in 4f4b76a
Math.abs()which strips the negative signApp/src/libs/ReportUtils.ts
Lines 5343 to 5346 in 4f4b76a
What changes do you think we should make in order to solve the problem?
To fix this issue we have to REMOVE the
Math.abs()at line 5345App/src/libs/ReportUtils.ts
Lines 5343 to 5346 in 4f4b76a
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?
N/A
yuwenmemon commentedon Dec 10, 2025
cc @rayane-d this is coming from #75934
rayane-d commentedon Dec 10, 2025
It appears that this bug wasn't introduced by my PR. It's reproducible in production and was discovered while testing my PR on staging
[-]Report - LHN and copied message show positive amount on negative expenses on member´s side[/-][+][$250] Report - LHN and copied message show positive amount on negative expenses on member´s side[/+]melvin-bot commentedon Dec 17, 2025
Job added to Upwork: https://www.upwork.com/jobs/~022001206540815244657
greg-schroeder commentedon Dec 17, 2025
Okay sending through to External as it's not a regression
26 remaining items
NJ-2020 commentedon Jan 8, 2026
Hi 👋 After looking into this one more deeply, at the first glance it seems a BE issue, but we navigate to another chat and then come back to trigger the
OpenReportAPI call, the BE returns the report expense (transactions), but it didn't return expense report, so this check condition will return true and will displayreportActionMessageinstead oforiginalReportAction?.childReportNamesince the current report action has 3 child money requestApp/src/libs/ReportUtils.ts
Lines 5066 to 5073 in a0bb986
Screen.Recording.2026-01-08.at.16.11.24.mp4
But it seems after this [issue/PR], the expected behaviour is to return the current report name whenever if the action is report preview, so in this case it will be:
Expense Report 2026-01-08Screen.Recording.2026-01-08.at.16.20.57.mov
But it seems it doesn't work properly for unloaded report because of this check condition
App/src/libs/ReportUtils.ts
Lines 5062 to 5064 in a0bb986
Screen.Recording.2026-01-08.at.16.28.55.mov
We only check if the
copyActionis true & thereporthas been loaded/exists, but in this case it will return false, i think it being caused by this commit accidentally.I think we should update the code to:
Thanks.
mavrickdeveloper commentedon Jan 8, 2026
@NJ-2020 I think we might be looking at different problems here. The issue title specifically says
"show positive amount on negative expenses", it's fundamentally about the amount value being wrong, not about which string/report name gets returned.Your fix at lines 5062-5064 would return childReportName
("Expense Report 2026-01-08")instead of the amount-containing message - but that'sSIDE-STEPPINGthe problem rather than fixing it. if you look at line 5240 vs line 5255 in the same function - there's already an internal inconsistency. WhenlinkedTransactionis available,getTransactionAmount(linkedTransaction, isExpenseReport(report))handles signs correctly based on report type. But when it falls back to originalMessage.amount, it unconditionally appliesMath.abs().That's the actual bug ,the fallback path doesn't match the primary path's sign-aware logic.i believe my proposal addresses the root issue: #77178 (comment)
melvin-bot commentedon Jan 9, 2026
@shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jan 13, 2026
@shubham1206agra 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
greg-schroeder commentedon Jan 14, 2026
Thoughts on the above @shubham1206agra?
shubham1206agra commentedon Jan 14, 2026
Ok, I investigated this further, and it seems like @NJ-2020 is correct here. The behaviour is correct, but BE uses bracket notation to show a negative expense, which is why the expense appears positive, but it is actually negative.
@greg-schroeder, can you close this issue, as I don't think we will prioritise fixing this behaviour for now?
melvin-bot commentedon Jan 19, 2026
@shubham1206agra Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Jan 21, 2026
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
melvin-bot commentedon Jan 24, 2026
@shubham1206agra Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!