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-03-19] [$500] Approving a report causes the workspace chat to “flash” in the LHN before disappearing #35309
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Make sure user A (submitter) and user B (approver) on a workspace with scheduled submit (e.g. delayed submission)
Have user A create a request via Request money
Have user A submit the report
As user B, user A’s workspace chat will show unread in the LHN
As user B, tap into user A’s report, approve it
Expected Result:
The workspace chat will flash unread, with GBR in the LHN, before disappearing shortly thereafter.
Actual Result:
The workspace chat shouldn’t flash unread in the LHN, with GBR applied
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Approving a report causes the workspace chat to “flash” in the LHN before disappearing[/-][+][$500] Approving a report causes the workspace chat to “flash” in the LHN before disappearing[/+]on Jan 29, 2024
Please re-state the problem that we are trying to solve in this issue.
The workspace chat shouldn’t flash unread in the LHN, with GBR applied
What is the root cause of that problem?
When approving a money request here, we're not setting hasOutstandingChildRequest to false optimistically if there's no more IOU to approve/pay. That's why the GBR will stick for a while until the backend response with the correct hasOutstandingChildRequest comes.
What changes do you think we should make in order to solve the problem?
Set hasOutstandingChildRequest to false optimistically if there's no more IOU to approve/pay (if there is, hasOutstandingChildRequest should be true. The condition is similar to here and we should check it for the REPORTPREVIEW actions (& corresponding iouReports) in the chat.
If there's any other condition besides this one to determine hasOutstandingChildRequest, we should also include those conditions.
We can restore hasOutstandingChildRequest to previous value in failureData as well.
What alternative solutions did you explore? (Optional)
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.50-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve 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:
[@situchan] The PR that introduced the bug has been identified. Link to the PR:
[@situchan] 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:
[@situchan] 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:
[@situchan] Determine if we should create a regression test for this bug.
[@situchan] 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.
[@muttmuure] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
[-]Approving a report causes the workspace chat to “flash” in the LHN before disappearing[/-][+][$500] Approving a report causes the workspace chat to “flash” in the LHN before disappearing[/+]melvin-bot commentedon Jan 29, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0175776c123c4a6522
melvin-bot commentedon Jan 29, 2024
Triggered auto assignment to @muttmuure (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 29, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan (
External)tienifr commentedon Jan 29, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The workspace chat shouldn’t flash unread in the LHN, with GBR applied
What is the root cause of that problem?
When approving a money request here, we're not setting
hasOutstandingChildRequesttofalseoptimistically if there's no more IOU to approve/pay. That's why the GBR will stick for a while until the backend response with the correcthasOutstandingChildRequestcomes.What changes do you think we should make in order to solve the problem?
Set
hasOutstandingChildRequesttofalseoptimistically if there's no more IOU to approve/pay (if there is,hasOutstandingChildRequestshould betrue. The condition is similar to here and we should check it for the REPORTPREVIEW actions (& corresponding iouReports) in the chat.If there's any other condition besides this one to determine
hasOutstandingChildRequest, we should also include those conditions.We can restore
hasOutstandingChildRequestto previous value infailureDataas well.What alternative solutions did you explore? (Optional)
NA
situchan commentedon Feb 1, 2024
@tienifr's proposal looks good to me.
🎀 👀 🎀 C+ reviewed
melvin-bot commentedon Feb 1, 2024
Triggered auto assignment to @iwiznia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
20 remaining items
melvin-bot commentedon Mar 12, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Mar 12, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.50-5 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-03-19. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Mar 12, 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:
muttmuure commentedon Mar 19, 2024
@situchan @tienifr can you recommend a regression test
muttmuure commentedon Mar 19, 2024
Both are paid up
situchan commentedon Mar 19, 2024
Regression Test Proposal
Prerequisites: Make sure user A (submitter) and user B (approver) on a workspace with scheduled submit (e.g. delayed submission)
muttmuure commentedon Apr 3, 2024
Done