[$250] Submit expense:requests with just one category/tag aren’t automatically selected
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.73-0 Reproducible in staging?: Yes Reproducible in production?: Yes 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: @JmillsExpensify Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1715521849768599
Action Performed:
Prerequisite: Create a collect policy, make sure there is only one possible category, same for tags
- Go to the staging.new.expensify.com and login
- Submit an expense without selecting category and tag
Expected Result:
Expenses with just one possible category/tag are automatically selected.
Actual Result:
Expenses with just one possible category/tag are NOT automatically selected
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- [ ] Android: Native
- [ ] Android: mWeb Chrome
- [ ] iOS: Native
- [ ] iOS: mWeb Safari
- [X] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/38435837/ffbcdd06-e685-4468-a3b3-ae831b15c37b
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01007d3005ad5ee0b2
- Upwork Job ID: 1802794860672433988
- Last Price Increase: 2024-07-08
Triggered auto assignment to @adelekennedy (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.
@m-natarajan it seems like this issue still needs to be filled out?
@m-natarajan it seems like this issue still needs to be filled out?
It was by mistake I hit the enter key, Sorry about it and ready to review now.
no worries - I was sure I was missing something!
Putting this on hold until we align in Slack.
on hold
still on hold
bumped the slack thread
checked in on the thread again - not adding a project just yet as this may have resolved
@JmillsExpensify check me on this - after troubleshooting with Jenna you're still seeing the same issue so we should take this off hold and make it a collect issue
taking this off hold as @JmillsExpensify is still experiencing this!
Job added to Upwork: https://www.upwork.com/jobs/~01007d3005ad5ee0b2
Triggered auto assignment to Contributor-plus team member for initial proposal review - @allroundexperts (External)
@allroundexperts, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!
No proposals.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@allroundexperts, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!
Still looking for proposals.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@allroundexperts, @adelekennedy Eep! 4 days overdue now. Issues have feelings too...
Still waiting for proposals
@allroundexperts, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@JmillsExpensify are you still experiencing this bug? We're not getting proposals just yet so I want to see if this is still reproducible and then explore our options
@allroundexperts, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@allroundexperts, @adelekennedy Still overdue 6 days?! Let's take care of this!
Upwork job price has been updated to $500
updating the price
Proposal
Please re-state the problem that we are trying to solve in this issue.
tags and categories are not auto selected if there is only one of them present.
What is the root cause of that problem?
Even when we only have a single tag or category we return early and not set the tag/ category if they are not required:
Category: https://github.com/Expensify/App/blob/ea49b19750f614f27da4e93faddccc865fe21cd3/src/components/MoneyRequestConfirmationList.tsx#L623-L624 Tag: https://github.com/Expensify/App/blob/ea49b19750f614f27da4e93faddccc865fe21cd3/src/components/MoneyRequestConfirmationList.tsx#L637-L638 This is the reason why single tag and category aren't auto selected
What changes do you think we should make in order to solve the problem?
If we want to auto select when we only have single tag/category we need to remove the extra !isCategoryRequired condition from here and the extra !isTagListRequired from here.
Result Video
https://github.com/user-attachments/assets/637a8185-8eb0-4ac9-8075-fb7249c12b98