-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Web - Workspace - IOU moves in the LHN every time the merchant is changed #38425
Comments
👋 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:
|
Triggered auto assignment to @hayata-suenaga ( |
We think that this bug might be related to #wave-collect - Release 1 |
Issue is not reproduce in Prod bandicam.2024-03-15.22-26-02-304.mp4 |
taking a look at this issue |
This might be considered a regression from #38027 – now, every time we update the MoneyRequest field, we call App/src/pages/home/ReportScreen.tsx Lines 365 to 374 in d78c0f1
The reason why the issue happens is that on updating the money request, we set the However, I would blame this PR: #34866 – it changed the way we calculate the optimistic |
ProposalPlease re-state the problem that we are trying to solve in this issue.The chat report's GBR disappears for a moment when modifying the money request data. Note: this shouldn't really be a blocker, because the version on Staging only allowed this bug to be more visible – it exists in Prod as well. What is the root cause of that problem?The reason why the issue happens is that on updating the money request, we set the In this PR, we've added the logic for calculating the optimistic Lines 1261 to 1262 in 2979e3c
However, this code doesn't work as expected. e.g. it strongly checks What changes do you think we should make in order to solve the problem?First, we should modify the function getOutstandingChildRequest(policy: OnyxEntry<Policy> | EmptyObject, iouReport: OnyxEntry<Report> | EmptyObject): OutstandingChildRequest {
if (!iouReport || isEmptyObject(iouReport)) {
return {};
}
if (!isPolicyExpenseChat(iouReport)) {
return {
hasOutstandingChildRequest: iouReport.managerID === currentUserAccountID && iouReport.total !== 0,
};
}
if (!needsToBeManuallySubmitted(iouReport)) {
return {
hasOutstandingChildRequest: false,
};
}
if (PolicyUtils.isPolicyAdmin(policy)) {
return {
hasOutstandingChildRequest: true,
};
}
// We don't need to update hasOutstandingChildRequest in this case
return {};
} Lines 419 to 438 in 5770e23
Second, use this function instead of the incorrect custom checks: {
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport?.parentReportID}`,
value: ReportUtils.getOutstandingChildRequest(policy, updatedMoneyRequestReport),
}, Lines 1257 to 1264 in 5770e23
Lines 3029 to 3035 in 5770e23
What alternative solutions did you explore? (Optional) |
@paultsimura, I opened a PR to implement the fix you suggested. As you're also a C+, I assigned in the PR as a reviewer. |
Updated proposal: #38425 (comment) |
@paultsimura let's go with your updated proposal. Please open a PR when you have time 🙇 |
Looks like I was recommended as C+ 😄 |
I'm sorry @situchan, but a C+ seems to be automatically assigned to the PR and they already reviewed it 🙇 |
It's OK, Situ went OOO and asked to re-assign this issue 👍 |
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
This was deployed to production yesterday, the automation didn't work: #38675 (comment) |
This is due payment tomorrow. |
sorry about that. apparently, i added and then removed the label 😆 |
Also @akinwale bump for a checklist, please 🙏 |
@hayata-suenaga I'm not sure that was the correct label though because it didn't assign a BZ member. I think you should have added & removed the |
@hayata-suenaga @paultsimura I believe adding the |
Likely regression from #34866, where the way the value for
Regression Test StepsTest 1
Test 2 (Scheduled Submit disabled) Prerequisites
Test 3 (Scheduled Submit enabled) Prerequisites
Test 4 Prerequisite: The money request currency should match the workspace currency
As User A
Do we agree 👍 or 👎? |
Triggered auto assignment to @laurenreidexpensify ( |
@paultsimura @akinwale offers sent in Upwork 👍 |
@laurenreidexpensify Accepted. Thanks! |
@laurenreidexpensify accepted, thanks |
Payment Summary:
|
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.53.1
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/4428435&group_by=cases:section_id&group_id=294998&group_order=asc
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
It shouldn't move. If an order change is needed due to the unread status, it should only happen once.
Actual Result:
IOU moves in the LHN every time the merchant is changed.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6415247_1710525981908.bandicam_2024-03-15_18-47-10-675.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: