Closed izarutskaya closed 6 days ago
Triggered auto assignment to @anmurali (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
A "hmm... it's not here" page appears, and both the "back" button and the "go back to home page" link are not responsive
fieldList
data can be object or array. After creating workspace, fieldList
is array, so in
https://github.com/Expensify/App/blob/53eee53ac8bfbdfd4d8eeaf16940e3b165483373/src/pages/EditReportFieldPage.tsx#L53
policy?.fieldList?.[fieldKey]
is undefined
so reportField
is undefined
so condition:
https://github.com/Expensify/App/blob/53eee53ac8bfbdfd4d8eeaf16940e3b165483373/src/pages/EditReportFieldPage.tsx#L60
is true
.
That issue does not appear in ReportDetailPage
because we use:
https://github.com/Expensify/App/blob/53eee53ac8bfbdfd4d8eeaf16940e3b165483373/src/pages/ReportDetailsPage.tsx#L628-L631
which works well regardless the policy.fieldList
is array or object.
We should use:
const reportField = report?.fieldList?.[fieldKey] ?? (isArray(policy?.fieldList) ? policy?.fieldList?.find((o) => o.fieldID === fieldKey) : policy?.fieldList?.[fieldKey]);
We can use the same as what we did in:
https://github.com/Expensify/App/blob/53eee53ac8bfbdfd4d8eeaf16940e3b165483373/src/pages/ReportDetailsPage.tsx#L628-L631
to make sure it works in both case the policy.fieldList
is array or object
const reportField = report?.fieldList?.[fieldKey] ?? Object.values(policy?.fieldList).find((o) => o.fieldID === fieldKey);
We can remove 2 lines: https://github.com/Expensify/App/blob/53eee53ac8bfbdfd4d8eeaf16940e3b165483373/src/pages/EditReportFieldPage.tsx#L69-L70 as well.
A "hmm... it's not here" page appears, and both the "back" button and the "go back to home page" link are not responsive
/** Report fields attached to the policy */
fieldList?: Record<string, OnyxCommon.OnyxValueWithOfflineFeedback<PolicyReportField>>;
fieldList
data is defined as an object. But after creating workspace, fieldList
in respoonse.policy
is array. I can see it in console log as below
Finished API request in 750ms - {"command":"CreateWorkspace","jsonCode":200,"requestID":"8b1d5cfa4c3584ed-HKG"}
{
"approvalMode": "OPTIONAL",
...
"fieldList": [
{
"defaultExternalID": null,
"defaultValue": "{report:type} {report:startdate}",
"deletable": true,
"disabledOptions": [],
"externalID": null,
"externalIDs": [],
"fieldID": "text_title",
"isTax": false,
"keys": [],
"name": "title",
"orderWeight": 0,
"origin": null,
"target": "expense",
"type": "formula",
"value": null,
"values": []
}
],
...
"id": "F8AC0C1478D5ECBE",
"ownerAccountID": 16529869
}
In WorkspaceProfilePage, there is an API request to get policy from BE (Policy.openPolicyProfilePage(route.params.policyID);
) to update fieldList
to right object. But this API cannot be called because queue is paused.
https://github.com/Expensify/App/blob/66ae37403897f907d26e5dcb3b1b3744ea1055da/src/pages/workspace/WorkspaceProfilePage.tsx#L97
I find in logs that there are gaps between deferred updates. So shouldPauseQueue
is set to true to ensure the client resolves the gap in onyx updates
After sending invoice to user and choosing send from the new workspace, an error occurred when visiting EditReportFieldPage
.
https://github.com/Expensify/App/blob/66ae37403897f907d26e5dcb3b1b3744ea1055da/src/pages/EditReportFieldPage.tsx#L53
This happens because policy?.fieldList?
is an array and you cannot get right reportField
. The FullPageNotFoundView
is shown.
https://github.com/Expensify/App/blob/66ae37403897f907d26e5dcb3b1b3744ea1055da/src/pages/EditReportFieldPage.tsx#L60
CreateWorkspace
, should return the right type of fieldList that is defined in onyx type fieldList?: Record<string, OnyxCommon.OnyxValueWithOfflineFeedback<PolicyReportField>>;
fieldList
is updated correctly after calling API request with command OpenPolicyProfilePage
We can fix it tempolary at client side to get right fieldList
by using this code to replace the code at line 53 of EditReportFieldPage.tsx
:
https://github.com/Expensify/App/blob/66ae37403897f907d26e5dcb3b1b3744ea1055da/src/pages/EditReportFieldPage.tsx#L53
const reportField = report?.fieldList?.[fieldKey] ?? (isArray(policy?.fieldList) ? policy?.fieldList?.find((o) = o.fieldID === fieldKey) : policy?.fieldList?.[fieldKey]);
@anmurali Huh... This is 4 days overdue. Who can take care of this?
Job added to Upwork: https://www.upwork.com/jobs/~01d7c703877e9d58e3
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External
)
@eVoloshchak, @anmurali Huh... This is 4 days overdue. Who can take care of this?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@eVoloshchak @anmurali this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@eVoloshchak, @anmurali Still overdue 6 days?! Let's take care of this!
Issue not reproducible during KI retests. (First week)
@eVoloshchak, @anmurali Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
Cannot reproduce this issue either, @dominictb, @zinzaducnm, could you please double check if this is still reproducible for you?
@eVoloshchak I cannot reproduce now. I checked the log and saw that:
CreateWorkspace
API called, policy.fieldList
is arrayfieldList
dataAs I inspected it in my proposal
In WorkspaceProfilePage, there is an API request to get policy from BE (Policy.openPolicyProfilePage(route.params.policyID);) to update fieldList to right object. But this API cannot be called because queue is paused.
It seems issue related to queue not happening anymore.
Cannot reproduce this issue either, @dominictb, @zinzaducnm, could you please double check if this is still reproducible for you?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@eVoloshchak, @anmurali Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@eVoloshchak, @anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@eVoloshchak @anmurali this issue is now 4 weeks old, please consider:
Thanks!
@eVoloshchak, @anmurali 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
@eVoloshchak Can you reproduce this bug based on my suggestion?
@eVoloshchak, @anmurali 12 days overdue now... This issue's end is nigh!
Yes, I get an unexpected error in the send flow and then trying to change the title or description of the invoice triggers a its not here page error.
@zinzaducnm - can you maybe retry and restate your proposal?
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@eVoloshchak, @anmurali Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@eVoloshchak, @anmurali 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@dominictb, thank you for the steps, was able to reproduce the issue
I noticed two problems when applying your proposal
https://github.com/user-attachments/assets/eecea85b-6db2-487b-bf06-6e4a265f2b63
@eVoloshchak I can also reproduce the above in latest main, so I think it is not related to my solution. Can you help check again?
Issue not reproducible during KI retests. (Second week)
@eVoloshchak, @anmurali Eep! 4 days overdue now. Issues have feelings too...
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.17-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): biruknew45+2293dh@gmail.com Logs: https://stackoverflow.com/c/expensify/questions/4856 Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
The title page should open.
Actual Result:
A "hmm... it's not here" page appears, and both the "back" button and the "go back to home page" link are not responsive
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/user-attachments/assets/364d7056-5963-49fd-a929-9686324ef84d
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @eVoloshchak