App
App copied to clipboard
[$500] [MEDIUM] Feature Request: Auto select the category and/or tag if there is only one option
Include auto-selection of tags/categories when a single option is available
Problem
Currently, when a receipt is scanned (or manually created) in a workspace that contains only a single category and/or a single task, the system does not automatically select these options. As a result, users are required to manually choose them even after the receipt is smartscanned. This adds unnecessary steps to the receipt upload > Smartscan process since there's a single option to chose from.
Solution
Include an auto-selection process to select the category and/or task when a receipt is scanned in a workspace that has only one option available in each category/tag. This would remove the manual selection process and save a few clicks to the user.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01dd9fec7e03798e66
- Upwork Job ID: 1750912778352738304
- Last Price Increase: 2024-01-26
- Automatic offers:
- jjcoffee | Reviewer | 28135508
- dukenv0307 | Contributor | 28135509
Triggered auto assignment to @strepanier03 (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details.
- I am happy to work on it if it is external
Proposal
Please re-state the problem that we are trying to solve in this issue.
- Feature Request: Auto select the category and/or tag if there is only one option
What is the root cause of that problem?
- NA
What changes do you think we should make in order to solve the problem?
- I think we should include an auto-selection process to select the category and/or task in the confirmation screen rather than when a receipt is scanned
- We can add the useEffect to MoneyTemporaryForRefactorRequestConfirmationList to check if the
policyCategories.length
is equal to1
or not, if true, set the initial category to it like below:
useEffect(() => {
if (!iouCategory && shouldShowCategories && Object.keys(policyCategories).length === 1) {
const key = head(Object.keys(policyCategories));
IOU.setMoneyRequestCategory_temporaryForRefactor(transaction.transactionID, policyCategories[key].name);
}
}, [...]);
- Also, we can consider that if the category field is required or not.
- Do the same with tag
What alternative solutions did you explore? (Optional)
- NA
@dukenv0307 FYI the issue has been updated. The proposed solution was not correct previously.
@puneetlath I think we should include an auto-selection process to select the category and/or task in the confirmation screen rather than when a receipt is scanned. What do you think about it? Also, I updated proposal
Yes, agreed. I think the confirmation page in any of the request flows -- manual, scan, distance -- should auto-select categories and/or tags if there is only one option for any of them.
@puneetlath What do you think about my proposal here?
Job added to Upwork: https://www.upwork.com/jobs/~01dd9fec7e03798e66
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External
)
@dukenv0307 I'll let @jjcoffee weigh in on that first 😄
Hi @puneetlath , i'd like to propose a fix for this is this still requires attention or dukenv0307 solution is accepted
📣 @mavrickdeveloper! 📣 Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
- Make sure you've read and understood the contributing guidelines.
- Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
- Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
- Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
@mavrickdeveloper You're always welcome to make a proposal until you see a comment with C+ reviewed
in it - no need to ask!
Removing my assignment since it looks like @puneetlath is the assigned internal engineer here!
@puneetlath little bump on the proposal review here.
Sounds good to me. Thanks for the bump.
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
I am working on it
@puneetlath, @strepanier03, @jjcoffee, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!
Not overdue.
Calm down Melv. @dukenv0307 is working on it.
@jjcoffee The PR https://github.com/Expensify/App/pull/35862 is ready to review
@puneetlath Just checking, does it make sense to limit this to only auto-select if a category or tag is required for the workspace?
It probably makes sense to hold this for https://github.com/Expensify/App/pull/34983 so that we support multi-level tags here too.
@puneetlath Just checking, does it make sense to limit this to only auto-select if a category or tag is required for the workspace?
Good question. I think it makes sense to only auto-select if they are required, like you say.
We're just waiting on https://github.com/Expensify/App/pull/34983 here, should be merged today!
Nearly there! Just one small issue to iron out on the PR.
@puneetlath Another quick question for you, if you don't mind. Currently categories and tags only display as required on FE if the violations beta is enabled. Should we also respect that here so we only auto-select where the category/tag is required and if the beta is enabled, or do we want to just auto-select regardless of the beta?