Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAID] [$500] [MEDIUM] Feature Request: Auto select the category and/or tag if there is only one option #35134

Closed
kavimuru opened this issue Jan 25, 2024 · 52 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@kavimuru
Copy link

kavimuru commented Jan 25, 2024

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
Issue OwnerCurrent Issue Owner: @strepanier03
@kavimuru kavimuru added Weekly KSv2 NewFeature Something to build that is a new item. labels Jan 25, 2024
Copy link

melvin-bot bot commented Jan 25, 2024

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 25, 2024

  • 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 to 1 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

@puneetlath puneetlath changed the title Feature Request: Auto select the last used category and tag for the same category and tag Feature Request: Auto select the category and/or tag if there is only one option Jan 25, 2024
@puneetlath
Copy link
Contributor

@dukenv0307 FYI the issue has been updated. The proposed solution was not correct previously.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 26, 2024

@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

@puneetlath
Copy link
Contributor

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.

Screenshot 2024-01-26 at 9 17 49 AM Screenshot 2024-01-26 at 9 18 04 AM Screenshot 2024-01-26 at 9 18 40 AM

@dukenv0307
Copy link
Contributor

@puneetlath What do you think about my proposal here?

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Jan 26, 2024
@melvin-bot melvin-bot bot changed the title Feature Request: Auto select the category and/or tag if there is only one option [$500] Feature Request: Auto select the category and/or tag if there is only one option Jan 26, 2024
Copy link

melvin-bot bot commented Jan 26, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01dd9fec7e03798e66

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 26, 2024
Copy link

melvin-bot bot commented Jan 26, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 26, 2024
@puneetlath puneetlath self-assigned this Jan 26, 2024
@puneetlath
Copy link
Contributor

@dukenv0307 I'll let @jjcoffee weigh in on that first 😄

@mavrickdeveloper
Copy link

Hi @puneetlath , i'd like to propose a fix for this
is this still requires attention or dukenv0307 solution is accepted

Copy link

melvin-bot bot commented Jan 26, 2024

📣 @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:

  1. Make sure you've read and understood the contributing guidelines.
  2. 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.
  3. 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.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@strepanier03 strepanier03 changed the title [$500] Feature Request: Auto select the category and/or tag if there is only one option [Medium] [$500] Feature Request: Auto select the category and/or tag if there is only one option Jan 26, 2024
@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
@jjcoffee
Copy link
Contributor

@dukenv0307's proposal sounds good to me!

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot removed the Overdue label Jan 29, 2024
Copy link

melvin-bot bot commented Jan 29, 2024

Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 11, 2024
@melvin-bot melvin-bot bot changed the title [$500] [MEDIUM] Feature Request: Auto select the category and/or tag if there is only one option [HOLD for payment 2024-03-18] [$500] [MEDIUM] Feature Request: Auto select the category and/or tag if there is only one option Mar 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 11, 2024
Copy link

melvin-bot bot commented Mar 11, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Mar 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.49-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-03-18. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Mar 11, 2024

BugZero Checklist: The PR adding this new feature has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@jjcoffee] Please propose regression test steps to ensure the new feature will work correctly on production in further releases.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon.

@puneetlath
Copy link
Contributor

Testing this on staging and it is properly auto-selecting the Category but not the Tag, even though there is only one.

Screenshot 2024-03-11 at 2 22 30 PM Screenshot 2024-03-11 at 2 22 39 PM

Is that because the policyTags_ object incorrectly says that tags aren't required? Even though the policy_ object says they are?
Screenshot 2024-03-11 at 2 24 51 PM

Screenshot 2024-03-11 at 2 24 30 PM

@jjcoffee
Copy link
Contributor

@puneetlath Yup that's right, as we discussed on the PR it should be working fine for multi-level tags though. Unsure if Yuwen's fix has hit prod yet.

@trjExpensify
Copy link
Contributor

@jjcoffee looks like it hit prod 5 days ago:

image

@jjcoffee
Copy link
Contributor

@trjExpensify Hmm can you comment on that issue to say that we're still seeing the incorrect required prop come through on single-level tags?

@trjExpensify
Copy link
Contributor

@mountiny
Copy link
Contributor

Noting same as @puneetlath did not work for me for Department tag

@JmillsExpensify
Copy link

I'm also having the same issue as Puneet.

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 17, 2024
Copy link

melvin-bot bot commented Mar 19, 2024

@puneetlath, @strepanier03, @jjcoffee, @dukenv0307 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

@strepanier03
Copy link
Contributor

Was OoO yesterday so didn't pay this out. In light of the convo above, should I hold on paying this for now?

@melvin-bot melvin-bot bot removed the Overdue label Mar 19, 2024
@puneetlath
Copy link
Contributor

I think we can pay. The outstanding issue is a back-end issue that should get fixed via this PR: https://github.com/Expensify/Auth/pull/10205

@strepanier03
Copy link
Contributor

Got it, thanks for weighing in Puneet. I'll move this forward now.

@strepanier03
Copy link
Contributor

Payment has been handled for both contributors.

@strepanier03 strepanier03 changed the title [HOLD for payment 2024-03-18] [$500] [MEDIUM] Feature Request: Auto select the category and/or tag if there is only one option [PAID] [$500] [MEDIUM] Feature Request: Auto select the category and/or tag if there is only one option Mar 20, 2024
@strepanier03
Copy link
Contributor

Closing, but if that was premature feel free to reopen it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
No open projects
Development

No branches or pull requests

10 participants