-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2024-08-14] [$250] Hold - Missing "Unhold" on the report header of held expense after it is moved to new report offline #46371
Comments
Triggered auto assignment to @alexpensify ( |
@alexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
ProposalPlease re-state the problem that we are trying to solve in this issue.Missing "Unhold" on the report header of held expense after it is moved to new report offline What is the root cause of that problem?App/src/pages/home/report/ContextMenu/ContextMenuActions.tsx Lines 266 to 267 in 08bb00b
Because More detail in The underlying issue is that when we approve the request, we don't to include the What changes do you think we should make in order to solve the problem?Lines 6246 to 6254 in 08bb00b
optimisticExpenseReport is new iouReport Thus, +const newParentReportActionID = rand64();
const optimisticExpenseReport = ReportUtils.buildOptimisticExpenseReport(
chatReport.reportID,
chatReport.policyID ?? iouReport.policyID ?? '',
recipient.accountID ?? 1,
(firstHoldTransaction?.amount ?? 0) * -1,
getCurrency(firstHoldTransaction),
false,
+ newParentReportActionID
);
+const optimisticExpenseReportPreview = ReportUtils.buildOptimisticReportPreview(chatReport, optimisticExpenseReport, '', firstHoldTransaction, optimisticExpenseReport.reportID, newParentReportActionID);
In the buildOptimisticExpenseReport and buildOptimisticReportPreview functions, we need to update them to incorporate the new parameter. An alternative approach is to use optimisticExpenseReport.parentReportActionID directly in buildOptimisticReportPreview instead of adding a new parameter. However, I prefer the previous approach because it is safer. Another BugWhile addressing the original bug, I discovered an additional issue. We can observe this new bug in the bug video at timestamp 0:52. The total amount in the report preview (and in iouReport) isn’t updated when a partial approval occurs Causes and solutionsWe’re not updating the total amount in the optimistic data. To resolve this issue, we need to adjust the total amount for iouReport and reportPreview using the Lines 6715 to 6719 in 08bb00b
|
ProposalPlease re-state the problem that we are trying to solve in this issue.hold option is missing on the report details of the held expense after it is moved to a new report offline What is the root cause of that problem?The held requests are moved to a new expense report and a new report preview is also created. Still, we haven't updated the Line 6246 in 98d8a5a
Line 6254 in 98d8a5a
Then App/src/pages/ReportDetailsPage.tsx Line 122 in 98d8a5a
Another bug here is we updated the total of the new expense report as the amount of the first hold transaction and it's wrong. I think maybe the reason is each hold transaction can have a different currency. Line 6250 in 98d8a5a
What changes do you think we should make in order to solve the problem?
Line 6254 in 98d8a5a
What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~0154caef32a9b3ac64 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ikevin127 ( |
There was some discussion on the report amounts here and why some of the behavior is intentional 🤔 |
Also, a PR is in progress around context menus- hopefully there's no overlap there as well? I'm seeing if the fix here may also address this? #41655 |
♻️ Will review proposals today, check on possible overlap issues and see if it solves the other mentioned issue. |
Indeed, based on that comment I would not go out of scope in this issue - keep it contained to what this issue is about strictly.
Regarding #45151, took a quick-look and I don't think there are any conflicts between the work done there and this issue. @cdOut should be able to confirm whether or not my assumption is right. Regarding #41655 - I don't think there's any overlap here. @cretadn22's proposal LGTM. The RCA was identified and the solution solves the issue. We should only fix the OP issue via the main solution. Keep the other found bug separate as it's not within the scope of this issue. 🎀👀🎀 C+ reviewed |
Current assignee @robertjchen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@nkdengineer In the future, please be mindful of the contributor guidelines as repeated failure in following the rules can lead to warnings and even removal from the contributor program.
|
@ikevin127 Thanks for your feedback. I think my proposal is different from the selected proposal. The main ideal is the same but the implementation is different Here is the alternative implementation from the selected proposal. It mentioned to use
And here is my implementation
That is why I posted a new proposal. |
@robertjchen we need your review here? Thanks! |
Let's do it 👍 |
📣 @ikevin127 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @cretadn22 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@cretadn22 Please let us know when we can expect a PR to be ready for review🧑💻 |
The PR is up today |
Awesome, waiting for automation to kick in here. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.17-2 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 2024-08-14. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Regression Test ProposalPrecondition: Workspace has an approver (can be workspace owner).
Do we agree 👍 or 👎. |
cc @alexpensify |
Payouts due: 2024-08-14
Upwork job is here. |
I've completed the payment process via Upwork and will close this issue for now. Later this week, I'll create the regression test request. |
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.0.13-3
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Issue found when executing PR #42573
Action Performed:
Precondition:
Expected Result:
Unhold option should be present on the report details of the held expense after it is moved to a new report offline
Actual Result:
hold option is missing on the report details of the held expense after it is moved to a new report offline
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6554728_1722089982378.bandicam_2024-07-27_22-12-39-358.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @alexpensifyThe text was updated successfully, but these errors were encountered: