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

[Report Fields] [$500] [MEDIUM] Expense - Unable to unselect option in report field #36602

Closed
6 tasks done
kbecciv opened this issue Feb 15, 2024 · 24 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Feb 15, 2024

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.42.1
Reproducible in staging?: y
Reproducible in production?: y
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: Applause - Internal Team
Slack conversation:

Issue found when executing PR #36304

Action Performed:

Precondition: admin creates a Collect workspace in OD and invites an employee, admin sets up a dropdown field with a few options in Reports > Report and Invoice Fields

  1. Open the app and log in as the employee
  2. Navigate to the workspace room
  3. Request money from the workspace
  4. Open the report and then the report field "Field"
  5. Select any option
  6. Open the report field again and unselect the option

Expected Result:

The option is unselected, the checkmark is not displayed, and the report field is empty

Actual Result:

The option stays selected and is displayed in the report field. Also, the selected option is displayed in "Recent" instead of above "Recent" and "All" sections like in other places Category, tags

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6380799_1708009905864.Recording__211.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0119ace936e559d689
  • Upwork Job ID: 1758162235501703168
  • Last Price Increase: 2024-02-15
  • Automatic offers:
    • Ollyws | Reviewer | 0
    • FitseTLT | Contributor | 0
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 15, 2024
@melvin-bot melvin-bot bot changed the title Expense - Unable to unselect option in report field [$500] Expense - Unable to unselect option in report field Feb 15, 2024
Copy link

melvin-bot bot commented Feb 15, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0119ace936e559d689

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

melvin-bot bot commented Feb 15, 2024

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

Copy link

melvin-bot bot commented Feb 15, 2024

Triggered auto assignment to @greg-schroeder (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@kbecciv
Copy link
Author

kbecciv commented Feb 15, 2024

We think that this bug might be related #wave6-collect-submitters
cc @greg-schroeder

@neonbhai
Copy link
Contributor

given that this is a regression from recent PR, we should probably have the deploy blocker label here

@FitseTLT
Copy link
Contributor

FitseTLT commented Feb 15, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Unable to unselect option in report field

What is the root cause of that problem?

We are setting the selected value without checking it is the already selected one here

onSelectRow={(option: Record<string, string>) => onSubmit({[fieldID]: option.text})}

What changes do you think we should make in order to solve the problem?

We should change it to

                        onSelectRow={(option: Record<string, string>) => onSubmit({[fieldID]: option.text === fieldValue ? '' : option.text})}

So that the empty string will not be added for recently used fields we need to change

if (reportField.type === 'dropdown') {

if (reportField.type === 'dropdown') {

to

    if (reportField.type === 'dropdown' && reportField.value) {

What alternative solutions did you explore? (Optional)

@greg-schroeder greg-schroeder changed the title [$500] Expense - Unable to unselect option in report field [$500][MEDIUM] Expense - Unable to unselect option in report field Feb 16, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Feb 17, 2024

@FitseTLT's proposal LGTM.

There was also the issue of Also, the selected option is displayed in "Recent" instead of above "Recent" and "All" sections like in other places Category, tags but we can sort that out in the PR.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 17, 2024

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

@greg-schroeder
Copy link
Contributor

Next up is @grgia to confirm the contributor assignment here!

@melvin-bot melvin-bot bot removed the Overdue label Feb 19, 2024
@greg-schroeder greg-schroeder changed the title [$500][MEDIUM] Expense - Unable to unselect option in report field [$500] [MEDIUM] Expense - Unable to unselect option in report field Feb 20, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 21, 2024
Copy link

melvin-bot bot commented Feb 21, 2024

📣 @Ollyws 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 21, 2024

📣 @FitseTLT 🎉 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 📖

@melvin-bot melvin-bot bot added the Overdue label Feb 22, 2024
Copy link

melvin-bot bot commented Feb 23, 2024

@Ollyws, @greg-schroeder, @grgia, @FitseTLT Whoops! This issue is 2 days overdue. Let's get this updated quick!

@Ollyws
Copy link
Contributor

Ollyws commented Feb 26, 2024

Not overdue, awaiting PR.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 26, 2024
@grgia
Copy link
Contributor

grgia commented Feb 29, 2024

@FitseTLT could you give a ETA on the PR?

@melvin-bot melvin-bot bot removed the Overdue label Feb 29, 2024
@FitseTLT
Copy link
Contributor

Will be ready EOW

This comment was marked as outdated.

@greg-schroeder
Copy link
Contributor

Bump @FitseTLT - do you have a Draft PR you can link as a starting point at least? Thanks!

@melvin-bot melvin-bot bot added the Overdue label Mar 4, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Mar 4, 2024

Awaiting PR

@melvin-bot melvin-bot bot removed the Overdue label Mar 4, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Mar 5, 2024
@FitseTLT
Copy link
Contributor

FitseTLT commented Mar 5, 2024

@Ollyws PR ready

@JmillsExpensify JmillsExpensify changed the title [$500] [MEDIUM] Expense - Unable to unselect option in report field [Report Fields] [$500] [MEDIUM] Expense - Unable to unselect option in report field Mar 12, 2024
@JmillsExpensify
Copy link

It looks like we've closed the linked PR, so shouldn't we close this issue as well as a result?

@greg-schroeder
Copy link
Contributor

Closing!

@Ollyws
Copy link
Contributor

Ollyws commented Mar 26, 2024

@greg-schroeder I think according to section 19 of the process doc, in this situation payment is due for the C+ and contributor. Thanks.

@greg-schroeder
Copy link
Contributor

sent offers to you both, you are correct

@Ollyws
Copy link
Contributor

Ollyws commented Mar 28, 2024

Accepted, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review Weekly KSv2
Projects
No open projects
Development

No branches or pull requests

7 participants