-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-07-24] [$250] Empty Entry in LHN with RBR and "Hmm.. It's not there message when clicked #45035
Comments
This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989 |
Current assignee @iwiznia is eligible for the AutoAssignerNewDotQuality assigner, not assigning anyone new. |
Triggered auto assignment to @abekkala ( |
Triggered auto assignment to @jasperhuangg ( |
@m-natarajan, you should not assign the reporter to these issues, it will get someone auto assigned if the label |
The issue here seems to be that the client isn't clearing out the optimistic report for some reason when the back-end returns the pre-existing report. I have four of these reports where they show up in the LHN like this, but when you click on them, you get "report not found". In all four scenarios, there is a
This indicates that this was an optimistic report that got created and the back-end responded to OpenReport by setting the preexisting report field. At that point, this code or this code should have kicked in to clear the report out of Onyx. For some reason that didn't happen. I think what we should potentially do is never show reports that have preexistingReportIDs in the LHN as there is no reason for them to be there. |
This makes sense, but I think I first would want to know why the existing code we have is not working, since as you mention, this allegedly should be handled already. |
Perhaps the problem is that every time it gets navigated to we are adding another not found item to the error fields object
And that's what makes it so that it stays in the LHN and is never able to be cleared. |
Job added to Upwork: https://www.upwork.com/jobs/~01ae00b986e1d955ec |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk ( |
@iwiznia I asked @m-natarajan to assign the reporter because they have the most context for the bug and also need to confirm that the bug is fixed. If you don't want to do that, that's fine, but it would be more helpful to the project if you did. |
I haven't been able to reproduce it yet. |
ProposalPlease re-state the problem that we are trying to solve in this issue.One empty entry observed in LHN with RBR and when clicked displays "Hmm... Its not here" message What is the root cause of that problem?The callback to clear the duplicate report is App/src/libs/actions/Report.ts Line 1323 in c973e62
It's unfortunately only triggered here App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions/ComposerWithSuggestions.tsx Line 356 in c973e62
What changes do you think we should make in order to solve the problem?We should not rely on the event emitter's rendering for the dup report clearance. So we'll use another mechanism to save the draft comment as intended here.
So the difference in approaches here is we don't rely on component rendering and event emitter but we'll update the data in Onyx directly In the callback we can clear the What alternative solutions did you explore? (Optional)If the user is on the dupe report route (using this check), use EventEmitter as existing implementation, otherwise use the above direct Onyx get and save implementation. |
@puneetlath It will get cleared the next time you reload the site (no need to click on it), because handleReportChanged will run for every report upon first Onyx data load. |
Thanks @dominictb, I tested it look good!
@puneetlath, do you think implementing this would be a good safety measure? |
📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Ok let's go with @dominictb. Can you raise a PR today?
I kind of think yes. But maybe it's better to start with these changes and see where they get us. What do you think? |
Sounds great 😃 |
Working on this now! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.7-8 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-07-24. 🎊 For reference, here are some details about the assignees on 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:
|
PAYMENT SUMMARY FOR JULY 24
|
@brunovjk please complete checklist above prior to payment date - thanks! |
|
@dominictb and @brunovjk payments sent and contracts ended - thank you! 🎉 |
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:
Reproducible in staging?: Needs reproduction
Reproducible in production?: Needs reproduction
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @iwiznia
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1720455609916209
Action Performed:
Expected Result:
All reports or IOU displayed with username and message
Actual Result:
One empty entry observed in LHN with RBR and when clicked displays "Hmm... Its not here" message
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
ReportID Is 1915196065459787
Logs: {
"reportID": "3916529629983126",
"preexistingReportID": "65121290",
"lastReadTime": "2024-07-02 18:08:57.011",
"errorFields": {
"notFound": {
"1719943737548592": "Report not found",
"1720459088807020": "Report not found",
"1720459290281777": "Report not found"
}
},
"participants": {},
"pendingFields": {},
"isOptimisticReport": false
}
Got preexisting report from Auth::openReport, new report was not created ~~ optimisticReportID: '3916529629983126' preexistingReportID: '65121290'
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @abekkala / @abekkalaThe text was updated successfully, but these errors were encountered: