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-05-22] Tag – “Add tag” button missing when create new workspace and enable tags #42092

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

Comments

@m-natarajan
Copy link

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?: no
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:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Log in.
  3. Create new workspace
  4. Click on More features and enable tags

Expected Result:

“Add tag” button appears in the top right corner

Actual Result:

“Add tag” button missing in the top right corner when create new workspace and enable 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

Bug6479611_1715619257196.tag.mp4

View all open jobs on GitHub

@m-natarajan m-natarajan added DeployBlockerCash This issue or pull request should block deployment Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. 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 @marcaaron (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented May 13, 2024

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

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.

@github-actions github-actions bot removed the Daily KSv2 label May 13, 2024
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.

@m-natarajan
Copy link
Author

@bfitzexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@ShridharGoel
Copy link
Contributor

Proposal

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

“Add tag” button missing when create new workspace and enable tags

What is the root cause of that problem?

doesPolicyContainOnlyOneTagList becomes false when we have no tag lists.

This leads to the below condition becoming false because of which the button doesn't show:

{doesPolicyContainOnlyOneTagList && !isThereAnyAccountingConnection && (
    <Button
        medium
        success
        onPress={navigateToCreateTagPage}
        icon={Expensicons.Plus}
        text={translate('workspace.tags.addTag')}
        style={[styles.mr3, isSmallScreenWidth && styles.w50]}
    />
)}

Existing logic to get the lists:

    const policyTagLists = useMemo(() => PolicyUtils.getTagLists(policyTags), [policyTags]);

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

Update the logic to this:

const policyTagLists = useMemo(() => {
    const tagLists = PolicyUtils.getTagLists(policyTags)
    return tagLists.length > 0 ? tagLists : [{
        name: '',
        required: false,
        tags: {},
    }]
}, [policyTags]);

@marcaaron
Copy link
Contributor

marcaaron commented May 13, 2024

Seems possibly a regression caused by #41351 cc @s77rt @roryabraham

@s77rt
Copy link
Contributor

s77rt commented May 13, 2024

Working on it

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Hourly KSv2 labels May 13, 2024
@s77rt
Copy link
Contributor

s77rt commented May 13, 2024

PR is ready for review

@marcaaron marcaaron removed the DeployBlocker Indicates it should block deploying the API label May 13, 2024
@marcaaron marcaaron added Hourly KSv2 and removed Weekly KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 13, 2024
@Beamanator
Copy link
Contributor

PR CP'd! #42106 (comment)

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

Testing well on staging! 👍 (noted here - #42106 (comment))

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 15, 2024
@melvin-bot melvin-bot bot changed the title Tag – “Add tag” button missing when create new workspace and enable tags [HOLD for payment 2024-05-22] Tag – “Add tag” button missing when create new workspace and enable tags May 15, 2024
Copy link

melvin-bot bot commented May 15, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.73-7 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-05-22. 🎊

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

  • @applause requires payment (Needs manual offer from BZ)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels May 21, 2024
Copy link

melvin-bot bot commented May 22, 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.

@bfitzexpensify
Copy link
Contributor

This was a fix for a regression related to #41279, so no payment here. Closing this out.

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

7 participants