Repository navigation
Closed
Closed
Copy link
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2ExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
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.1.99-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: https://test-management.browserstack.com/projects/2219752/test-runs/TR-439/folder/13176791/41237172/861418493
Email or phone of affected tester (no customers): sdhshssdjiosdndjs@gmail.com
Issue reported by: Applause - Internal Team
Action Performed:
- Go to staging.new.expensify.com
- Go to workspace chat
- Submit an expense in the workspace chat
- Open the expense report
- Click More > Split
- On split page, edit the amount of one of the splits to be lower than the original amount
- Click Save
- Click Total on the table header to sort the expenses
Expected Result:
The expenses can be sorted after split
Actual Result:
The expenses cannot be sorted after split
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
Bug6927502_1756232494799.Screen_Recording_2025-08-27_at_02.17.48.mp4
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021960478703209653842
- Upwork Job ID: 1960478703209653842
- Last Price Increase: 2025-08-26
Issue Owner
Current Issue Owner: @ChristinadobrzynMetadata
Metadata
Labels
Awaiting PaymentAuto-added when associated PR is deployed to productionAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.DailyKSv2KSv2ExternalAdded to denote the issue can be worked on by a contributorAdded to denote the issue can be worked on by a contributor
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Aug 26, 2025
Triggered auto assignment to @Christinadobrzyn (
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.FitseTLT commentedon Aug 26, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Unable to sort expenses after split
What is the root cause of that problem?
For split transactions the
modifiedAmountis the real split amount value but we are sorting it withamountkey hereApp/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Lines 85 to 89 in f54a2c1
What changes do you think we should make in order to solve the problem?
We should use the key
modifiedAmountif it exists hereApp/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Lines 85 to 89 in f54a2c1
We can use a better switch to consider other modified fields too like
modifiedCurrencyand others too.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)
[-]Expense - Unable to sort expenses after split[/-][+][$250] Expense - Unable to sort expenses after split[/+]melvin-bot commentedon Aug 26, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021960478703209653842
melvin-bot commentedon Aug 26, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (
External)Christinadobrzyn commentedon Aug 26, 2025
I can reproduce this so sending to External
lorretheboy commentedon Aug 27, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-08-27 01:50:50 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Unable to sort expenses after split
What is the root cause of that problem?
Root cause is because for split transactions, the
modifiedAmountis the real split amount value, but the sorting is using the amount key instead of consideringmodifiedAmountApp/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Lines 85 to 88 in a083eb6
What changes do you think we should make in order to solve the problem?
Replace original function by
getTransactionSortValuefunction to use the existinggetAmountutility which properly handlesmodifiedAmountvsamountlogicThen update this place to call new function
App/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Line 156 in a083eb6
We should also add
useAbsoluteValues = falsethis props to compareValues to disable the compare absolute value if for the negative sorting caseApp/src/libs/SearchUIUtils.ts
Line 1594 in c5d59f4
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add test to test the MoneyRequestReportTransactionList - Transaction Sorting
What alternative solutions did you explore? (Optional)
We should update the
getTransactionKeyfunction to handle the amount field properly by returning the appropriate amount value (consideringmodifiedAmountvsamount) rather than just the field nameApp/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Line 87 in a083eb6
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.
nkdengineer commentedon Aug 27, 2025
🚨 Edited by proposal-police: This proposal was edited at 2025-08-27 02:12:42 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
The expenses cannot be sorted after split
What is the root cause of that problem?
All split transactions have the
amountas theamountfrom the original transaction. The real amount is inmodifiedAmountfieldApp/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Line 156 in 0061124
Because we get the value to compare from the
amountfield, nothing happenApp/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Lines 85 to 87 in 0061124
What changes do you think we should make in order to solve the problem?
Instead of returning the key, we can create a function to get the comparison value and use the existing util to get the correct value from the transaction.
We have an important note for the amount field. The amount from the expense report is negative, so we should use
getAmountfunction to return the positive amount. We also have a problem if the transaction has a different currency from the workspace currency. To resolve this issue, the backend should return the correctoriginalAmountin the transaction data, allowing us to compare it with others (currently, the backend returns theoriginalAmountas 0).App/src/components/MoneyRequestReportView/MoneyRequestReportTransactionList.tsx
Line 156 in 0061124
The
compareValuesfunction always compares the positive amount; we should update and remove the convert to abs logic here or we should define a new param to control compare original amount or compare the positive value and pass this parameter accordingly when we want to compare the original value.App/src/libs/SearchUIUtils.ts
Lines 1585 to 1600 in ae5f666
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)
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.
33 remaining items
[-][$250] Expense - Unable to sort expenses after split[/-][+][Due for payment 2025-09-19] [$250] Expense - Unable to sort expenses after split[/+]melvin-bot commentedon Sep 12, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Sep 12, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.2.12-4 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-09-19. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Sep 12, 2025
@suneox @Christinadobrzyn 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]
Christinadobrzyn commentedon Sep 16, 2025
payment is coming up @suneox please let us know about a regression test.
suneox commentedon Sep 18, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: https://github.com/Expensify/App/pull/58713/files#r2360060460
[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: N/A
[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.
https://github.com/Expensify/Expensify/issues/549317
Regression Test Proposal
Precondition:
Test:
Verify the expenses are sorted correctly in ascending order
Do we agree 👍 or 👎
Christinadobrzyn commentedon Sep 19, 2025
Payment day -
Regression test - #69302 (comment)
Payment summary - #69302 (comment)
@suneox can you please make sure to request payment through ND? Closing as complete
quinthar commentedon Oct 12, 2025
Approved $250 to @suneox