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

[$250] Workspace - Category and Tag "Required" switch is enabled and locked evenif all tags are disable #55431

Open
8 tasks
lanitochka17 opened this issue Jan 17, 2025 · 63 comments
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

@lanitochka17
Copy link

lanitochka17 commented Jan 17, 2025

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.87-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): testpayment935@gmail.com
Issue reported by: Applause - Internal Team
Component: Workspace Settings

Action Performed:

  1. Navigate to https://staging.new.expensify.com/
  2. Create WS and enable Tag
  3. Add some tags and enable "Members must tag all expenses" toggle
  4. Navigate to Category and enable "Members must categorize all expenses" toggle
  5. Select all Category and disable all category.
  6. Navigate to setting and note that the toggle is is disabled and locked
  7. Go back and navigate again and note that the toggle is enabled and locked
  8. Navigate to Tag and Select all tags.
  9. Disable all tags and navigate to setting and note that the toggle is enabled and locked

Expected Result:

The toggle is disabled and locked when all tags and categories are disabled

Actual Result:

The toggle is enabled and locked when all tags and categories are disabled

Workaround:

Unknown

Platforms:

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

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6717031_1737140837036.bandicam_2025-01-17_21-46-17-653.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @s77rt
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021896598139956436446
  • Upwork Job ID: 1896598139956436446
  • Last Price Increase: 2025-03-03
  • Automatic offers:
    • twilight2294 | Contributor | 106381697
@lanitochka17 lanitochka17 added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Jan 17, 2025
Copy link

melvin-bot bot commented Jan 17, 2025

Triggered auto assignment to @alexpensify (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.

@Themoonalsofall
Copy link
Contributor

Themoonalsofall commented Jan 17, 2025

Template proposal

Proposal

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

Workspace - Category and Tag "Required" switch is enabled and locked evenif all tags are disable

What is the root cause of that problem?

we define the toggle logic active

isActive={policy?.requiresCategory ?? false}

in case we have turned it on before, the toggle will still be on and locked even though all categories are disabled

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

We should turn off the active state of that toggle by update logic to

         isActive={(policy?.requiresCategory && hasEnabledOptions) ?? false}

and do the same with the Tag page

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

NA

What alternative solutions did you explore? (Optional)

Or we can add new useEffect to set policy.requiresCategory to false when all categories are disabled

    useEffect(()=>(
        if (!hasEnabledOptions) {
            updateWorkspaceRequiresCategory(false);
        }
    ),[hasEnabledOptions]);

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@gijoe0295
Copy link
Contributor

The second OpenPolicyCategoriesPage call when we dismiss the RHP returns policy's requiresCategory as true which is not correct, while the first same call returns false. This is BE related.

@allgandalf
Copy link
Contributor

@alexpensify this is a BE issue, please use Internal label

@melvin-bot melvin-bot bot added the Overdue label Jan 20, 2025
Copy link

melvin-bot bot commented Jan 21, 2025

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

@alexpensify alexpensify added the Hot Pick Ready for an engineer to pick up and run with label Jan 22, 2025
@alexpensify
Copy link
Contributor

I'm adding Hot Pick, but I'm still reviewing which wave to associate with this one to get more attention.

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jan 22, 2025
@alexpensify
Copy link
Contributor

Update: Hot Pick

@melvin-bot melvin-bot bot removed the Overdue label Jan 25, 2025
@alexpensify alexpensify added Weekly KSv2 Overdue and removed Daily KSv2 labels Jan 25, 2025
@melvin-bot melvin-bot bot removed the Overdue label Jan 25, 2025
Copy link

melvin-bot bot commented Jan 31, 2025

@alexpensify this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@alexpensify
Copy link
Contributor

Hot Pick!

@alexpensify
Copy link
Contributor

Weird, I thought this one was associated with a Project but updated it for more visibility.

@maddylewis maddylewis moved this from HIGH to HOT PICKS in [#whatsnext] #retain Feb 4, 2025
@melvin-bot melvin-bot bot added the Overdue label Feb 12, 2025
@alexpensify
Copy link
Contributor

Weekly Update: Hot Pick

@melvin-bot melvin-bot bot removed the Overdue label Feb 13, 2025
@dannymcclain
Copy link
Contributor

:send-it:

@tgolen
Copy link
Contributor

tgolen commented Feb 26, 2025

@twilight2294 Can you give a proposal for this prototype?

@twilight2294
Copy link
Contributor

Hey @tgolen apoligies, It's pretty late for me now to update the full proposal, but i read the whole conversation and understood the requirement, i quickly made code changes to show you the functionality:

Screen.Recording.2025-02-27.at.1.27.16.AM.mov

This is the basic idea which is required. I will update the proposal if needed first thing tomorrow, but if we want to move quickly on this one then you can assign me here and i can start working tomorrow, thanks for the patience, if you still need updated proposal i will update it tomorrow morning !

@tgolen
Copy link
Contributor

tgolen commented Feb 26, 2025 via email

@twilight2294
Copy link
Contributor

Updated proposal

Screen.Recording.2025-02-27.at.10.54.11.AM.mov

@twilight2294
Copy link
Contributor

@tgolen any feedback, also label external and assign me to the issue? thanks

@melvin-bot melvin-bot bot added the Overdue label Feb 28, 2025
@laurenreidexpensify laurenreidexpensify moved this from HOT PICKS to HIGH in [#whatsnext] #retain Mar 3, 2025
@tgolen tgolen added External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Mar 3, 2025
@melvin-bot melvin-bot bot changed the title Workspace - Category and Tag "Required" switch is enabled and locked evenif all tags are disable [$250] Workspace - Category and Tag "Required" switch is enabled and locked evenif all tags are disable Mar 3, 2025
Copy link

melvin-bot bot commented Mar 3, 2025

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

Copy link

melvin-bot bot commented Mar 3, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Mar 3, 2025
@tgolen
Copy link
Contributor

tgolen commented Mar 3, 2025

@s77rt Can you please check this proposal and make sure you are OK with it?

I think this part:

If Tags/Categories are required, but all tags/categories have been disabled, display a clear warning at the top of the Tags/Categories page that lets the workspace admin know that's not an ideal situation.

Can be removed. It was a hold-over from the previous proposal and we are actively preventing this situation from happening now.

@s77rt
Copy link
Contributor

s77rt commented Mar 3, 2025

@twilight2294 Thanks for the proposal. Overall the suggested changes look good to me.

🎀 👀 🎀 C+ reviewed
Link to proposal

Copy link

melvin-bot bot commented Mar 3, 2025

Current assignee @tgolen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 4, 2025
Copy link

melvin-bot bot commented Mar 4, 2025

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

Copy link

melvin-bot bot commented Mar 7, 2025

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

@melvin-bot melvin-bot bot added the Overdue label Mar 7, 2025
@s77rt
Copy link
Contributor

s77rt commented Mar 7, 2025

Not overdue. @twilight2294 Do you have an ETA of the PR?

@twilight2294
Copy link
Contributor

Thanks for the patience, PR is ready for review :

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
Status: HIGH
Development

No branches or pull requests