App: [HOLD for payment 2024-02-20] [$500] [HIGH] Instant Submit for Collect: App crashes if select expense category that was set via OldDot
Related to https://github.com/Expensify/Expensify/issues/334111
- Bugs found via testing steps found in this doc
Flow:
Pre-testing steps
- Create a new collect policy on OldDot and;
- Enable scheduled submit with a frequency of
Instant(this should happen by default with Expensify accounts, or accounts onpaidPolicyInstantSubmitbeta) - Invite an additional user to the policy to play the member role in these testing flows
- Enable scheduled submit with a frequency of
- Run the script in the chrome console (see script below) (in OldDot, when the workspace Settings page is open) to enable the policy for workspace creation for a paid plan.
p = Policy.getCurrent(); p.policy.isPolicyExpenseChatEnabled = "true"; p.save();
Test steps
- In OldDot: As submitter, create a report & add an expense
- In OldDot, update the expense’s category
- Verify the category gets updated live in NewDot
- In NewDot, open the expense & click on the newly updated category line
Currently the app crashes here ^. This also crashes for the admin in the same spot. We should verify if this category crash only happens if the policy is on “Instant Submit” or if other settings are affected
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0100a19ebcb4eea2f7
- Upwork Job ID: 1754500717683404800
- Last Price Increase: 2024-02-05
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 35 (29 by maintainers)
No problem, @rojiphil! Thanks for raising the question and having a constructive conversation!
@johncschuster Thanks for the transparency here. I do not expect any compensation here.
Sorry, somehow missed it. The solution is similar but it was not referred to. It was actually straight forward fix
If a category is renamed or deleted it should be removed from the list. @Beamanator we’re doing that here for deletion: https://github.com/Expensify/Auth/blob/7d0291377c973c7e7d826e796e30e3396c716731/auth/lib/Policy.cpp#L2852-L2859
and then here for renaming . . . where I do see that there’s no update of the Recently Used Categories 😅 : https://github.com/Expensify/Auth/blob/7d0291377c973c7e7d826e796e30e3396c716731/auth/lib/Policy.cpp#L2978-L2995
Ooh that’s a very fair point @rojiphil ! Though also, I feel like
Uncategorizedis often the default so I wonder if that’s a backend mistake for not sending that 😅I think we need to find the person who implemented these to get their input 😄
https://github.com/Expensify/App/blob/47228150dada8293d23b889184724b1b55b6fbc9/src/types/onyx/PolicyCategory.ts#L6
yes you’re right! it is a required type
internal 👍
Dupe of https://github.com/Expensify/App/issues/35543
Ooh very good question @rushatgabhane - and @rojiphil thanks for finding out where the front end bug is occurring.
Do we have any prop types defining if
enabledis required or not? It looks like inPolicyCategoryit’s required, no? Optional would beenabled?: boolean;right? So ya it does kinda seem like a backend bug