You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-10-14] [$250] Expense - Main chat with RBR is not removed after dismissing error from expense report #46662
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Version Number: 9.0.15-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://expensify.testrail.io/index.php?/tests/view/4783635 Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Device 1 and 2 are logged in with the same account
Go to staging.new.expensify.com
[Device 1] Go offline
[Device 2] Go to FAB > Split expense > Manual
[Device 2] Split a manual expense with two users
[Device 1] While offline, split the same manual expense with the two same users from Step 4 (Same amount and same users)
[Device 1] Go online
[Device 1] Go to the main chat with RBR.
[Device 1} Dimiss the error.
{Device 1] Note that both the main chat and expense report with RBR are removed after dismissing the error.
[Device 1] Click on the expense report with RBR (from another split participant) from LHN.
[Device 1] Dismiss the error
Expected Result:
Both the main chat and expense report with RBR will be removed after dismissing the error from the expense report
Actual Result:
The main chat with RBR is not removed after dismissing the error from the expense report
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
@JmillsExpensify 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
However, in #44142, they handle another case where the app will navigate back depending on whether to delete the transaction thread only or also the expense report (IOU.cleanUpMoneyRequest). If the expense report is deleted, then the user will be navigated back to the main chat. This works well to cover the case where the main chat is created. The problem is, that the logic for this takes priority over the logic explained in the first sentence above.
What changes do you think we should make in order to solve the problem?
We should restructure the condition so if the main report/chat fails to be created, then we will perform the delete main report and its child logic, otherwise, use IOU.cleanUpMoneyRequest logic.
if (transaction?.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.ADD) {
if (chatReport?.reportID && ReportUtils.getAddWorkspaceRoomOrChatReportErrors(chatReport)) {
Report.navigateToConciergeChatAndDeleteReport(chatReport.reportID, true, true);
return;
}
if (parentReportAction) {
const urlToNavigateBack = IOU.cleanUpMoneyRequest(transaction?.transactionID ?? linkedTransactionID, parentReportAction, true);
Navigation.goBack(urlToNavigateBack);
return;
}
}
We won't need this logic anymore too. It was added in #43346 which is now handled by IOU.cleanUpMoneyRequest.
changed the title [-]Expense - Main chat with RBR is not removed after dismissing error from expense report[/-][+][$250] Expense - Main chat with RBR is not removed after dismissing error from expense report[/+]on Aug 7, 2024
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:
[@getusha] The PR that introduced the bug has been identified. Link to the PR: #44142
[@getusha] 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/44142/files#r1818504065
[@getusha] A discussion in #expensify-bugs 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:
[@getusha] Determine if we should create a regression test for this bug. Seems like we already created a testrail for the same issue #43481 (comment)
[@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. N/a
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Aug 1, 2024
Triggered auto assignment to @JmillsExpensify (
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.lanitochka17 commentedon Aug 1, 2024
@JmillsExpensify 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
lanitochka17 commentedon Aug 1, 2024
We think that this bug might be related to #wave-collect - Release 1
bernhardoj commentedon Aug 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The main chat isn't removed when clearing the transaction from the expense report.
What is the root cause of that problem?
This was previously solved at #44923. Clearing the error will delete the main chat and all its child reports if the main chat fails to be created.
App/src/components/ReportActionItem/MoneyRequestView.tsx
Lines 441 to 455 in ec38b05
However, in #44142, they handle another case where the app will navigate back depending on whether to delete the transaction thread only or also the expense report (IOU.cleanUpMoneyRequest). If the expense report is deleted, then the user will be navigated back to the main chat. This works well to cover the case where the main chat is created. The problem is, that the logic for this takes priority over the logic explained in the first sentence above.
What changes do you think we should make in order to solve the problem?
We should restructure the condition so if the main report/chat fails to be created, then we will perform the delete main report and its child logic, otherwise, use
IOU.cleanUpMoneyRequestlogic.We won't need this logic anymore too. It was added in #43346 which is now handled by IOU.cleanUpMoneyRequest.
App/src/components/ReportActionItem/MoneyRequestView.tsx
Lines 452 to 454 in ec38b05
melvin-bot commentedon Aug 6, 2024
@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?
[-]Expense - Main chat with RBR is not removed after dismissing error from expense report[/-][+][$250] Expense - Main chat with RBR is not removed after dismissing error from expense report[/+]melvin-bot commentedon Aug 7, 2024
Job added to Upwork: https://www.upwork.com/jobs/~014accd823898117ec
61 remaining items
melvin-bot commentedon Oct 14, 2024
Payment Summary
Upwork Job
BugZero Checklist (@JmillsExpensify)
bernhardoj commentedon Oct 15, 2024
Requested in ND.
JmillsExpensify commentedon Oct 15, 2024
Payment summary above is correct.
JmillsExpensify commentedon Oct 15, 2024
@getusha do you mind filling out the BZ checklist before submitting via NewDot?
trjExpensify commentedon Oct 15, 2024
Confirming the payment summary is correct.
melvin-bot commentedon Oct 18, 2024
@JmillsExpensify, @yuwenmemon, @bernhardoj, @getusha Whoops! This issue is 2 days overdue. Let's get this updated quick!
JmillsExpensify commentedon Oct 21, 2024
$250 approved for @bernhardoj
JmillsExpensify commentedon Oct 21, 2024
@getusha closing this one out, though don't forget to complete the checklist and we can approve payment in NewDot.
getusha commentedon Oct 28, 2024
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:
[@getusha] The PR that introduced the bug has been identified. Link to the PR: #44142
[@getusha] 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/44142/files#r1818504065
[@getusha] A discussion in #expensify-bugs 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:
[@getusha] Determine if we should create a regression test for this bug. Seems like we already created a testrail for the same issue #43481 (comment)
[@getusha] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again. N/a
garrettmknight commentedon Oct 29, 2024
$250 approved for @getusha