Open kbecciv opened 3 months ago
:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Triggered auto assignment to @francoisl (DeployBlockerCash
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
We think that this bug might be related to #vip-split
Both the policies are different in the video, so one might have default category as car
and the other might now, is this really a bug @kbecciv ?? c.c. @francoisl
I can reproduce the issue, using the same workspace on staging and prod, and the category is being prefilled correctly in production.
Category is not automatically show for distance requests
When i console log the customUnits
of a policy i see that now we get 2 objects of the name distance
:
And we have taken the default category condition such that we will store the deafultcategory value without checking if defaultCategory exists : customUnit.name === CONST.CUSTOM_UNITS.NAME_DISTANCE
https://github.com/Expensify/App/blob/54c669f18d1d8b676f7bdd0fd7af655d931a6943/src/pages/iou/request/step/IOURequestStepConfirmation.js#L152-L156
And this causes a empty string to be stored as now we have 2 objects with the name distance
Add a condition to check if the matching object has defaultCategory
field, so the updated query would be:
const defaultCategory = lodashGet(
_.find(lodashGet(policy, 'customUnits', {}), (customUnit) => customUnit.name === CONST.CUSTOM_UNITS.NAME_DISTANCE && customUnit.defaultCategory),
'defaultCategory',
'',
);
N/A
@francoisl i was able to reproduce the issue, this seems to be the case now that we get 2 objects for the same name distance
Also reason why this is not reproducible on production is because, we recently changed the default workspace creation from Free
to Collect
now the response changes to give us 2 objects, you can test this with a free
workspace on staging
and you will observe that this bug is not reproducible there :)
This is the console log for a free workspace:
VS collect workspace:
This is NAB i think
This will be a backend fix, going to remove the label for now.
Job added to Upwork: https://www.upwork.com/jobs/~01495c58bc9b570f5d
Triggered auto assignment to Contributor Plus for review of internal employee PR - @fedirjh (Internal
)
It will be handled internally, no need for a C+ here.
@francoisl Huh... This is 4 days overdue. Who can take care of this?
@francoisl 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@francoisl 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
@francoisl 12 days overdue now... This issue's end is nigh!
This issue has not been updated in over 14 days. @francoisl eroding to Weekly issue.
This issue has not been updated in over 15 days. @francoisl eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
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: v1.4.58.0 Reproducible in staging?: y Reproducible in production?: n Issue reported by: Applause - Internal Team
Action Performed:
1, Open the FAB menu and select "Request Money." 2, Choose the distance mode option. 3, Enter start and end points, then click "Next." 4, Select workspace chat. 5, Observe that the Category field remains empty and is not automatically filled.
Expected Result:
The Category, labeled as "Car," should be automatically added when requesting money in distance mode.
Actual Result:
The Category field is not automatically populated when requesting money in distance mode.
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/5ebb7110-1a5f-4a70-9d0c-2fa05dfac24e
View all open jobs on GitHub
Upwork Automation - Do Not Edit