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-05-09] [HOLD for payment 2024-05-08] HIGH: [API Reliability] [$250] Multiple calls to OpenReport on signin #39673
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
If shouldFetchReport is true, then the difference between openReportIfNecessary and openReportIfNecessary is, fetchReportIfNeeded won't call OpenReport if the report already exists
What changes do you think we should make in order to solve the problem?
First, don't call openReportIfNecessary when ReportActionsView is mounted. Then, we need to decide whether we should always call OpenReport or not when ReportScreen is mounted even when we already have the report object. I would say yes so we always get the latest report data every time we visit a chat (and also because we did this in ReportActionsView, so the behavior is unchanged).
changed the title [-]HIGH: [Reliability] Multiple calls to OpenReport on signin[/-][+][$250] HIGH: [Reliability] Multiple calls to OpenReport on signin[/+]on Apr 9, 2024
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 Apr 5, 2024
Triggered auto assignment to @muttmuure (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.bernhardoj commentedon Apr 6, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
There are 2 duplicate OpenReport request when opening a report for the first time, for example after sign in.
What is the root cause of that problem?
The first OpenReport is called when ReportScreen is mounted (
fetchReportIfNeeded).App/src/pages/home/ReportScreen.tsx
Lines 434 to 438 in f150229
The second OpenReport is called when ReportActionsView is also mounted (
openReportIfNecessary).App/src/pages/home/report/ReportActionsView.tsx
Lines 238 to 245 in f150229
Both
openReportIfNecessaryandopenReportIfNecessarywon't call OpenReport ifshouldFetchReportis false.App/src/pages/home/report/ReportActionsView.tsx
Lines 114 to 116 in f150229
If
shouldFetchReportis true, then the difference betweenopenReportIfNecessaryandopenReportIfNecessaryis,fetchReportIfNeededwon't call OpenReport if the report already existsApp/src/pages/home/ReportScreen.tsx
Lines 399 to 404 in f150229
but
openReportIfNecessarywill always call it.App/src/pages/home/report/ReportActionsView.tsx
Lines 113 to 119 in f150229
What changes do you think we should make in order to solve the problem?
First, don't call
openReportIfNecessarywhen ReportActionsView is mounted. Then, we need to decide whether we should always call OpenReport or not when ReportScreen is mounted even when we already have the report object. I would say yes so we always get the latest report data every time we visit a chat (and also because we did this in ReportActionsView, so the behavior is unchanged).We can do that by removing this condition.
App/src/pages/home/ReportScreen.tsx
Lines 421 to 423 in 90412ec
melvin-bot commentedon Apr 8, 2024
@muttmuure Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Apr 9, 2024
Job added to Upwork: https://www.upwork.com/jobs/~0138cc8ab53b98e8c0
[-]HIGH: [Reliability] Multiple calls to OpenReport on signin[/-][+][$250] HIGH: [Reliability] Multiple calls to OpenReport on signin[/+]muttmuure commentedon Apr 9, 2024
Adding external
melvin-bot commentedon Apr 9, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)57 remaining items
muttmuure commentedon May 8, 2024
Awaiting payment date
melvin-bot commentedon May 13, 2024
@flodnv, @abdulrahuman5196, @muttmuure, @bernhardoj Eep! 4 days overdue now. Issues have feelings too...
flodnv commentedon May 14, 2024
@muttmuure can we pay and close this?
muttmuure commentedon May 14, 2024
Automation has failed, I will create a payment in Upwork tomorrow
melvin-bot commentedon May 20, 2024
@flodnv, @abdulrahuman5196, @muttmuure, @bernhardoj Huh... This is 4 days overdue. Who can take care of this?
muttmuure commentedon May 21, 2024
Paid