App icon indicating copy to clipboard operation
App copied to clipboard

[$250] Submit expense:requests with just one category/tag aren’t automatically selected

Open m-natarajan opened this issue 1 year ago • 24 comments

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

  1. Go to the staging.new.expensify.com and login
  2. 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

CleanShot 2024-05-12 at 07 52 09

https://github.com/Expensify/App/assets/38435837/ffbcdd06-e685-4468-a3b3-ae831b15c37b

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01007d3005ad5ee0b2
  • Upwork Job ID: 1802794860672433988
  • Last Price Increase: 2024-07-08

m-natarajan avatar May 13 '24 18:05 m-natarajan

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.

melvin-bot[bot] avatar May 13 '24 18:05 melvin-bot[bot]

@m-natarajan it seems like this issue still needs to be filled out?

adelekennedy avatar May 13 '24 18:05 adelekennedy

@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.

m-natarajan avatar May 13 '24 18:05 m-natarajan

no worries - I was sure I was missing something!

adelekennedy avatar May 13 '24 18:05 adelekennedy

Putting this on hold until we align in Slack.

JmillsExpensify avatar May 13 '24 18:05 JmillsExpensify

on hold

adelekennedy avatar May 15 '24 19:05 adelekennedy

still on hold

adelekennedy avatar May 20 '24 15:05 adelekennedy

bumped the slack thread

adelekennedy avatar May 29 '24 23:05 adelekennedy

checked in on the thread again - not adding a project just yet as this may have resolved

adelekennedy avatar Jun 07 '24 05:06 adelekennedy

@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

adelekennedy avatar Jun 07 '24 05:06 adelekennedy

taking this off hold as @JmillsExpensify is still experiencing this!

adelekennedy avatar Jun 17 '24 20:06 adelekennedy

Job added to Upwork: https://www.upwork.com/jobs/~01007d3005ad5ee0b2

melvin-bot[bot] avatar Jun 17 '24 20:06 melvin-bot[bot]

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

melvin-bot[bot] avatar Jun 17 '24 20:06 melvin-bot[bot]

@allroundexperts, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Jun 21 '24 18:06 melvin-bot[bot]

No proposals.

allroundexperts avatar Jun 22 '24 23:06 allroundexperts

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jun 24 '24 16:06 melvin-bot[bot]

@allroundexperts, @adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Jun 26 '24 18:06 melvin-bot[bot]

Still looking for proposals.

allroundexperts avatar Jun 26 '24 18:06 allroundexperts

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jul 01 '24 16:07 melvin-bot[bot]

@allroundexperts, @adelekennedy Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] avatar Jul 01 '24 18:07 melvin-bot[bot]

Still waiting for proposals

adelekennedy avatar Jul 02 '24 17:07 adelekennedy

@allroundexperts, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Jul 05 '24 18:07 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jul 08 '24 16:07 melvin-bot[bot]

@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

adelekennedy avatar Jul 08 '24 22:07 adelekennedy

@allroundexperts, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

melvin-bot[bot] avatar Jul 12 '24 18:07 melvin-bot[bot]

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

melvin-bot[bot] avatar Jul 15 '24 16:07 melvin-bot[bot]

@allroundexperts, @adelekennedy Still overdue 6 days?! Let's take care of this!

melvin-bot[bot] avatar Jul 16 '24 18:07 melvin-bot[bot]

Upwork job price has been updated to $500

melvin-bot[bot] avatar Jul 16 '24 20:07 melvin-bot[bot]

updating the price

adelekennedy avatar Jul 16 '24 20:07 adelekennedy

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

eucool avatar Jul 16 '24 21:07 eucool