[HOLD for #34988] [$500] Category - Selected category is absent in Recent when split scan is created offline
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: 1.4.31-2 Reproducible in staging?: Y Reproducible in production?: Y 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: Applause - Internal Team Slack conversation:
Issue found when executing PR https://github.com/Expensify/App/pull/34236
Action Performed:
Precondition: There are 5 items in Recent list for Category
- Go offline
- Go to workspace chat
- Create a split scan with a valid receipt and a category
- Go online
- Wait for the scan to complete
- After the scan split, open request money page and go to Category
- Refresh the page
- Repeat Step 6
Expected Result:
In Step 6, the category selected for the split scan will appear in Recent list
Actual Result:
In Step 6, the category selected for the split scan does not appear in Recent list. It only appears after refreshing the page in Step 7
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [x] Android: mWeb Chrome
- [x] iOS: Native
- [x] iOS: mWeb Safari
- [x] MacOS: Chrome / Safari
- [x] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/41cde507-244f-44c0-b6e2-27b2b5f41754
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~0126c98dc696c7c627
- Upwork Job ID: 1750169212796604416
- Last Price Increase: 2024-01-24
Job added to Upwork: https://www.upwork.com/jobs/~0126c98dc696c7c627
Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)
We think that this bug might be related to #wave. CC @greg-schroeder
Proposal
Please re-state the problem that we are trying to solve in this issue.
Category - Selected category is absent in Recent when split scan is created offline
What is the root cause of that problem?
When creating optimistic IOU report using buildOptimisticTransaction we don't pass category.
https://github.com/Expensify/App/blob/6cfdd6f47fe5f932b70f440104accffea586ef60/src/libs/TransactionUtils.ts#L87
What changes do you think we should make in order to solve the problem?
We need to pass category and other missing fields when building optimistic data, tag and billable are also not passed to buildOptimisticTransaction.
https://github.com/Expensify/App/blob/6cfdd6f47fe5f932b70f440104accffea586ef60/src/libs/actions/IOU.js#L1800
Result
This will be fixed in https://github.com/Expensify/App/issues/34988#issuecomment-1906783247
@greg-schroeder i think we should HOLD this for https://github.com/Expensify/App/issues/34988
Held, we'll close this if it's fixed by #34988
#34988 was deployed to prod - @getusha @paultsimura can either of you confirm this was in fact fixed and can be closed?
From my side, I can confirm it's fixed:
https://github.com/Expensify/App/assets/12595293/90324d6b-b42d-4006-aee2-6370d52a6bf2
Looks that way. Let's close then.