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

[HOLD for payment 2024-06-06] Tax - Delete tag option is shown in the dropdown when selecting tag via checkbox #42113

Closed
6 tasks done
kbecciv opened this issue May 13, 2024 · 13 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering

Comments

@kbecciv
Copy link

kbecciv commented May 13, 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.73-1
Reproducible in staging?: y
Reproducible in production?: n
Issue reported by: Applause - Internal Team
Issue found when executing PR: #41552

Action Performed:

Precondition:

  • Multi tags are uploaded to the workspace (attached below).
  1. Go to staging.new.expensify.com
  2. Go to workspace settings.
  3. Go to Tags.
  4. Click on any tag
  5. Click on any subtag.
  6. Note that delete option is hidden.
  7. Return to previous page.
  8. Select a tag via checkbox.
  9. Click three-dot menu.

Expected Result:

There will be no Delete tag option.

Actual Result:

Delete tag option is shown in the dropdown when selecting tag via checkbox.

Workaround:

n/a

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

Bug6479831_1715630301341.20240514_035416.mp4

View all open jobs on GitHub

@kbecciv kbecciv added DeployBlockerCash This issue or pull request should block deployment DeployBlocker Indicates it should block deploying the API labels May 13, 2024
Copy link

melvin-bot bot commented May 13, 2024

Triggered auto assignment to @jasperhuangg (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

Copy link

melvin-bot bot commented May 13, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open Staging deploy checklist to see the list of PRs included in this release, then work quickly on the following:

  1. If you find which PR caused the issue/bug, you can reassign it to the person responsible for it.
    • If the author is OOO or won’t get online before the daily deploy is due, you are responsible for finding the best fix/path forward. Don’t hesitate to ask for help!
  2. Try to reproduce the issue, if the bug is on production, remove the DeployBlocker label but stay assigned to fix it (or find out which PR broke it to get help from the author).
    • You can adjust the urgency of the issue to better represent the gravity of the bug.
    • If the issue is super low priority, feel free to un-assign yourself.
    • Be careful with PHP warnings, sometimes it is more complex than just adding a null coalescing operator as they might be uncovering some bigger bug.
    • If it was a one-off issue that requires no action (for example, Bedrock was down or it is a duplicated issue), you can close it.

Remember rule #2: Never un-assign yourself from a real DeployBlocker unless you are 100% sure someone else is assigned and will take care of it.

@kbecciv
Copy link
Author

kbecciv commented May 13, 2024

We think that this bug might be related to #vip-vsb

@allgandalf
Copy link
Contributor

Proposal

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

Delete tag option is shown for multi level tags in dropdown menu.

What is the root cause of that problem?

We do not check if !isMultiLevelTags is true before pushing the delete option:

if (!isThereAnyAccountingConnection) {
options.push({
icon: Expensicons.Trashcan,
text: translate(selectedTagsArray.length === 1 ? 'workspace.tags.deleteTag' : 'workspace.tags.deleteTags'),

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

We need to add an extra && !isMultiLevelTags check so that it will only push the delete option if the tags are not multi level as we cannot delete multi level tags on ND yet:

App/src/libs/PolicyUtils.ts

Lines 256 to 258 in ab3cd7d

function isMultiLevelTags(policyTagList: OnyxEntry<PolicyTagList>): boolean {
return Object.keys(policyTagList ?? {}).length > 1;
}

What alternative solutions did you explore? (Optional)

@jasperhuangg jasperhuangg removed the DeployBlocker Indicates it should block deploying the API label May 14, 2024
@jasperhuangg
Copy link
Contributor

This is a front-end regression that is a result of bad tests in #41552

@gijoe0295
Copy link
Contributor

gijoe0295 commented May 14, 2024

@jasperhuangg That wasn't bad test. The PR for muti-level tags view #41351 was merged after PR to hide delete option #41552. We weren't aware of that multi-level tags PR. But I can raise a fix PR now if necessary.

@jasperhuangg
Copy link
Contributor

@gijoe0295 Please do, I can review, let me know when it's ready, sorry for the confusion!

@jasperhuangg
Copy link
Contributor

I don't think this necessarily needs to be a blocker because multi-level tags aren't even supported on production yet. The contributor who raised the offending PR is pushing a fix in the meantime.

@jasperhuangg jasperhuangg added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels May 14, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 14, 2024
@gijoe0295
Copy link
Contributor

@jasperhuangg Please check it out here #42124.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels May 30, 2024
@melvin-bot melvin-bot bot changed the title Tax - Delete tag option is shown in the dropdown when selecting tag via checkbox [HOLD for payment 2024-06-06] Tax - Delete tag option is shown in the dropdown when selecting tag via checkbox May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.77-11 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-06-06. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

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 Engineering
Projects
None yet
Development

No branches or pull requests

4 participants