[$250] Web - IOU - Error message paying elsewhere partially a report with two held expenses and a tracked
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.70-0 Reproducible in staging?: Y Reproducible in production?: N Issue was found when executing this PR: https://github.com/Expensify/App/pull/49971 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team
Action Performed:
- Go to https://staging.new.expensify.com/ on a workspace chat
- Submit 3 expenses (1 expense with a different currency) and track 1 forth expense
- Hold 2 expenses (1 expense with the different currency)
- Go back to the main chat
- Select Pay elsewhere on the report
- Confirm the partial amount
Expected Result:
The partial amount is paid
Actual Result:
"The requested amount has changed" error message is shown
Workaround:
Unknown
Platforms:
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [ ] Android: mWeb Chrome
- [ ] iOS: Standalone
- [ ] iOS: HybridApp
- [ ] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/e662d436-8de4-4ec3-ad92-ff97486ed5f6
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021864070097967682615
- Upwork Job ID: 1864070097967682615
- Last Price Increase: 2024-12-03
Issue Owner
Current Issue Owner: @sobitneupane
Triggered auto assignment to @VictoriaExpensify (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.
Triggered auto assignment to @techievivek (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
💬 A slack conversation has been started in #expensify-open-source
:wave: 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:
- Identify the pull request that introduced this issue and revert it.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Production behavior
https://github.com/user-attachments/assets/bddff7d6-5884-4a56-935e-e95338bbb619
@bernhardoj Do you mind taking a look at this ticket and see if it's related to your changes above?
Job added to Upwork: https://www.upwork.com/jobs/~021864070097967682615
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)
Demoting as discussed in thread: https://expensify.slack.com/archives/C01GTK53T8Q/p1733206499066379
P.S when trying to look at this from that thread, I was getting a duplicate report preview when I held an expense on v9.0.70-1 desktop app.
Steps:
- Create 2 expenses in the workspace currency
- Create 1 expense in a different currency
- Click into the expense report
- Hover over the preview of the first expense in the report.
- Click
Holdfrom the comment action menu on the expense preview - Observe the duplicate report preview created
I wanna test this on prod, but the PR is deployed to prod already. I think this issue exists on prod too. The prod video here doesn't show the pay behavior. The issue here is that, when we pay money request with held expenses partially, we use the amount of unheldTotal as the pay total.
https://github.com/Expensify/App/blob/146204878d1b9d4358d91e9a0a81169a7819d96f/src/libs/actions/IOU.ts#L6642-L6645
However, unheldTotal includes non-reimbursable transactions too (track), so we got the error. Previously unheldTotal doesn't include non-reimbursable transactions, but we agreed to update it on the BE to include it. Since it's a BE change and has been updated since 16 Oct, I believe this exists on prod too.
The solution to this is to subtract unheldTotal by unheldNonReimbursableTotal.
@bernhardoj This seems like something we missed? The plan already covered that.
In the approve modal display:
Partial: unheldTotal Full: total
In the pay modal display:
Partial: unheldTotal - unheldNonReimbursableTotal Full: total - nonReimbursableTotal
@bernhardoj Please raise a PR since this is a regression (or at least it's something that was supposed to be done in the PR)
This seems like something we missed? https://github.com/Expensify/App/pull/49971#issuecomment-2397561749 already covered that.
That plan only handles the amount to be shown, not the API params.
I'll handle this tomorrow.
PR is ready
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.72-1 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/53622
If no regressions arise, payment will be issued on 2024-12-16. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @sobitneupane requires payment through NewDot Manual Requests
@sobitneupane @VictoriaExpensify @sobitneupane 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]
This issue was a regression from https://github.com/Expensify/App/pull/49971 PR and is handled by the author of the PR, payment and checklist will be handled in the original issue.
Let's close this one. No payment is due here (regression)
Payment Summary
- Reviewer: @sobitneupane owed $250 via NewDot
BugZero Checklist (@VictoriaExpensify)
- [ ] I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
- [ ] I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1864070097967682615/hired)
- [ ] I have paid out the Upwork contracts or cancelled the ones that are incorrect
- [ ] I have verified the payment summary above is correct
Closing this based on above comments.