App
App copied to clipboard
[$250] IOU - RBR is present in LHN but no error msg in combined report when deleting paid IOU offline
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: 1.4.60-5 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4476117 Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Precondition:
- User A and have no unsettled IOU.
- Go to staging.new.expensify.com
- [User A] Request money from User B.
- [User A] Go offline.
- [User B] Pay the request.
- [User A] Delete the request while offline.
- [User A] Go online.
- [User A] Go to transaction thread (one report view).
Expected Result:
The error "Unexpected error deleting the money request, please try again later" should be present in one transaction report view.
Actual Result:
There is RBR for one transaction report in LHN, but there is no error in the report itself. This issue happens when there is only one request.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [x] Android: Native
- [x] Android: mWeb Chrome
- [x] iOS: Native
- [x] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
https://github.com/Expensify/App/assets/115492554/60b740d3-c949-4693-bcb7-20b1a4201b18
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01ebfa7c151ee18ff6
- Upwork Job ID: 1776224622646538240
- Last Price Increase: 2024-04-12
Triggered auto assignment to @alexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to @madmax330 (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
: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.
@alexpensify 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.
We think this issue might be related to the #collect project.
Production
https://github.com/Expensify/App/assets/115492554/337c352e-d4ad-4b8c-a074-406a7deca616
This is a specific and rare flow so I dont think we have to hold the deploy on this one.
This is related to the combined view cc @NikkiWines
I think we can make this external
Job added to Upwork: https://www.upwork.com/jobs/~01ebfa7c151ee18ff6
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External
)
Proposal
Please re-state the problem that we are trying to solve in this issue.
IOU - RBR is present in LHN but no error msg in combined report when deleting paid IOU offline.
What is the root cause of that problem?
When a receipt error occurs, it will be logged within the parentReportAction
of the transaction
. Consequently, it will only be visible in the IOU report and not in the money request view.
With the recent introduction of the single transaction view, in scenarios involving only one money request, there won't be an IOU report generated. Therefore, any receipt errors and prompts to download associated files will not be displayed.
What changes do you think we should make in order to solve the problem?
Add Below mention code here
let errors = transaction?.errors ?? {};
if (parentReportAction?.errors) {
errors = {
...errors,
...parentReportAction?.errors
}
}
To get the receipt error from the parentReportAction
, we'll add to current error list to show here. As well as, Add condition (showMapAsImage || hasReceipt) || errors
inside OfflineWithFeedback
component to show or hide image component for expense image.
{(showMapAsImage || hasReceipt) || errors && (
and replace line# 266 with below code:
errors={errors}
Video:
https://drive.google.com/file/d/1L8UHfYOTKoEBsSxGtQ_aZSGoFZ4mS5wy/view?usp=sharing
@abdulrahuman5196 when you get a chance, can you review the proposals here? Thanks!
Hi, Will check on the proposals today
Checking now
On first glance, the proposal here https://github.com/Expensify/App/issues/39689#issuecomment-2040156570 makes sense. I will do further testing and comeback with updates
Thank you @abdulrahuman5196, keep us posted.
π£ It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? πΈ
Checking now
@kaushiktd I tested your proposed changes
But it is adding some image frame above the error. I think its from OfflineFeedback, kindly take a look into it.
Code I used for reference
--- a/src/components/ReportActionItem/MoneyRequestView.tsx
+++ b/src/components/ReportActionItem/MoneyRequestView.tsx
@@ -255,15 +255,23 @@ function MoneyRequestView({
[transactionAmount, isSettled, isCancelled, isPolicyExpenseChat, isEmptyMerchant, transactionDate, hasErrors, canUseViolations, hasViolations, translate, getViolationsForField],
);
+ let errors = transaction?.errors ?? {};
+if (parentReportAction?.errors) {
+ errors = {
+ ...errors,
+ ...parentReportAction?.errors
+ }
+}
+
return (
<View style={[StyleUtils.getReportWelcomeContainerStyle(isSmallScreenWidth, true, shouldShowAnimatedBackground)]}>
{shouldShowAnimatedBackground && <AnimatedEmptyStateBackground />}
<View style={shouldShowAnimatedBackground && [StyleUtils.getReportWelcomeTopMarginStyle(isSmallScreenWidth, true)]}>
{/* eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing */}
- {(showMapAsImage || hasReceipt) && (
+ {(showMapAsImage || hasReceipt) || errors && (
<OfflineWithFeedback
pendingAction={pendingAction}
- errors={transaction?.errors}
+ errors={errors}
errorRowStyles={[styles.ml4]}
onClose={() => {
@abdulrahuman5196 You need to enclose View component inside OfflineWithFeedback
on below mentioned condition here,
src/components/ReportActionItem/MoneyRequestView.tsx#L275
{(showMapAsImage || hasReceipt) &&
<View>
</View>
}
This will prevent rendering an empty image box on the report thread.
@kaushiktd 's proposal here https://github.com/Expensify/App/issues/39689#issuecomment-2040156570 looks good and works well.
π π π C+ Reviewed
Current assignee @madmax330 is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
Heads up, I will be offline until Tuesday, April 23, 2024, and will not actively watch over this GitHub during that period.
If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!
@abdulrahuman5196 any update so far?
Bump for @madmax330 to review.
π£ @abdulrahuman5196 π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
β There was an error making the offer to @kaushiktd for the Contributor role. The BZ member will need to manually hire the contributor.
@abdulrahuman5196 PR submitted
Weekly Update: The PR is moving along through the review process.
Weekly Update: The PR is going through a recent round of reviews.
Weekly Update: The PR is under the last reviews