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 2023-09-21] [$1000] Scan IOU - 1:1 DM disappears after opening IOU report page when Scan IOU is created offline #25770
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
What changes do you think we should make in order to solve the problem?
We can add checking whether whisper action is REPORTPREVIEW action or not.
Only if whisper action is not REPORTPREVIEW action, then return false in shouldReportActionBeVisibleAsLastAction.
changed the title [-] Scan IOU - 1:1 DM disappears after opening IOU report page when Scan IOU is created offline[/-][+][$1000] Scan IOU - 1:1 DM disappears after opening IOU report page when Scan IOU is created offline[/+]on Aug 30, 2023
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: N.A.
Determine if we should create a regression test for this bug. Yes
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
Open app
Go to settings -> preferences -> Enable force offline
Create a Scan IOU with another user with no conversation history.
Open 1:1 DM and IOU report
Verify that 1:1 DM report will not disappear from LHN after opening IOU report page
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 23, 2023
Triggered auto assignment to @mallenexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Aug 23, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)StevenKKC commentedon Aug 23, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Scan IOU - 1:1 DM disappears after opening IOU report page when Scan IOU is created offline
What is the root cause of that problem?
If create a Scan IOU with a user with no conversation history,
CREATEDaction andREPORTPREVIEWaction for chat report are generated.App/src/libs/actions/IOU.js
Line 418 in ebb6d33
App/src/libs/actions/IOU.js
Line 438 in ebb6d33
When build a
REPORTPREVIEWaction, we are settingwhisperedToAccountIDsif has receipt.App/src/libs/ReportUtils.js
Line 2065 in ebb6d33
So
REPORTPREVIEWaction is treated as whisper action, and thenlastVisibleActionfor chat report isCREATEDaction.App/src/libs/ReportActionsUtils.js
Line 365 in 5d1d5f1
Therefore,
lastMessageTextfor chat report is empty, and then chat report is treated as empty chat and disappears from LHN.App/src/libs/ReportActionsUtils.js
Lines 399 to 403 in 5d1d5f1
App/src/libs/ReportUtils.js
Lines 2612 to 2613 in 5d1d5f1
What changes do you think we should make in order to solve the problem?
We can add checking whether whisper action is
REPORTPREVIEWaction or not.Only if whisper action is not
REPORTPREVIEWaction, then returnfalseinshouldReportActionBeVisibleAsLastAction.What alternative solutions did you explore? (Optional)
We can remove this line to not set
whisperedToAccountIDswhen buildREPORTPREVIEWaction.melvin-bot commentedon Aug 29, 2023
@mallenexpensify Huh... This is 4 days overdue. Who can take care of this?
[-] Scan IOU - 1:1 DM disappears after opening IOU report page when Scan IOU is created offline[/-][+][$1000] Scan IOU - 1:1 DM disappears after opening IOU report page when Scan IOU is created offline[/+]melvin-bot commentedon Aug 30, 2023
Job added to Upwork: https://www.upwork.com/jobs/~016eaa15aa0f40ecf9
melvin-bot commentedon Aug 30, 2023
Current assignee @mallenexpensify is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Aug 30, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (
External)50 remaining items
amyevans commentedon Oct 3, 2023
Bump @rushatgabhane
JmillsExpensify commentedon Oct 7, 2023
$1,500 payment approved for @rushatgabhane based on BZ summary.
melvin-bot commentedon Oct 9, 2023
@amyevans, @mallenexpensify, @rushatgabhane, @StevenKKC Eep! 4 days overdue now. Issues have feelings too...
amyevans commentedon Oct 9, 2023
@rushatgabhane friendly bump on the checklist, I think that's all that remains before we can close 🙏
melvin-bot commentedon Oct 13, 2023
@amyevans, @mallenexpensify, @rushatgabhane, @StevenKKC Whoops! This issue is 2 days overdue. Let's get this updated quick!
mallenexpensify commentedon Oct 13, 2023
@rushatgabhane please finish the BZ checklist then we can close, I'll ping ya in NewDot too
#25770 (comment)
rushatgabhane commentedon Oct 16, 2023
The PR that introduced the bug has been identified. Link to the PR: Optimistic report previews #21578
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/21578/files#r1360155419
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: N.A.
Determine if we should create a regression test for this bug. Yes
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
rushatgabhane commentedon Oct 16, 2023
@mallenexpensify updated! we need to add a regression test
mallenexpensify commentedon Oct 16, 2023
Thanks @rushatgabhane
https://github.com/Expensify/Expensify/issues/326587