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

  1. Create a new collect policy on OldDot and;
    1. Enable scheduled submit with a frequency of Instant (this should happen by default with Expensify accounts, or accounts on paidPolicyInstantSubmit beta)
    2. Invite an additional user to the policy to play the member role in these testing flows
  2. 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

  1. In OldDot: As submitter, create a report & add an expense
  2. In OldDot, update the expense’s category
    1. Verify the category gets updated live in NewDot
  3. 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)

Most upvoted comments

No problem, @rojiphil! Thanks for raising the question and having a constructive conversation!

Would this not qualify for compensation to me as well?

@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 Uncategorized is 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 😄

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 enabled is required or not? It looks like in PolicyCategory it’s required, no? Optional would be enabled?: boolean; right? So ya it does kinda seem like a backend bug