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-11] [$250] Tags settings – Unable to add Custom tag name in a new workspace #42205

Open
3 of 6 tasks
lanitochka17 opened this issue May 15, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented May 15, 2024

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: 1.4.74-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4561965
Email or phone of affected tester (no customers): applausetester+jp_e_category@applause.expensifail.com
Issue reported by: Applause - Internal Team

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
  5. Add 2 tags
  6. Click on Settings and select Custom tag name
  7. Enter Custom tag name and press Save

Expected Result:

Custom tag name in added

Actual Result:

Tag name is change and “Hmm… it’s not here” RHP appears when open it

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

Bug6481931_1715796719316.Custom_tag_name.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018e9f676195ac29b7
  • Upwork Job ID: 1791187130986975232
  • Last Price Increase: 2024-05-23
  • Automatic offers:
    • nkdengineer | Contributor | 102497235
Issue OwnerCurrent Issue Owner: @garrettmknight
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 15, 2024
Copy link

melvin-bot bot commented May 15, 2024

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

@lanitochka17
Copy link
Author

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

@lanitochka17
Copy link
Author

We think that this bug might be related to #wave-collect - Release 1

@nkdengineer
Copy link
Contributor

Proposal

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

Tag name is change and “Hmm… it’s not here” RHP appears when open it

What is the root cause of that problem?

When we enable policy tag, we don't create the optimistic data for policy tag so when we enable tag and open setting, custom tag name is empty and we can't edit this.

function enablePolicyTags(policyID: string, enabled: boolean) {

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

When we enable the tags feature, if the policyTagList doesn't exist we should create optimistic data for it the same as the image below

const policyTagList = allPolicyTags?.[policyID];
if (!policyTagList) {
    const defaultTagList: PolicyTagList = {
        Tag: {
            name: 'Tag',
            orderWeight: 0,
            required: false,
            tags: {}
        }
    }
    onyxData.optimisticData?.push({
        onyxMethod: Onyx.METHOD.SET,
        key: `${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`,
        value: defaultTagList,
    })
    onyxData.failureData?.push({
        onyxMethod: Onyx.METHOD.SET,
        key: `${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`,
        value: null
    })
}
Screenshot 2024-05-16 at 15 36 32

function enablePolicyTags(policyID: string, enabled: boolean) {

What alternative solutions did you explore? (Optional)

NA

@garrettmknight garrettmknight added the External Added to denote the issue can be worked on by a contributor label May 16, 2024
@melvin-bot melvin-bot bot changed the title Tags settings – Unable to add Custom tag name in a new workspace [$250] Tags settings – Unable to add Custom tag name in a new workspace May 16, 2024
Copy link

melvin-bot bot commented May 16, 2024

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

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

melvin-bot bot commented May 16, 2024

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

@garrettmknight
Copy link
Contributor

Reproduced and opened up. @mananjadhav what do you think of this first proposal?

@mananjadhav
Copy link
Collaborator

I just tested @nkdengineer's proposal it does seem to work. I was able to reproduce the error in the latest main, but when I was in a different branch the error didn't exist. I don't see any changes in enablePolicyTags. So I am not sure if we've got the correct root cause.

@nkdengineer
Copy link
Contributor

@mananjadhav Can you share what is the result when you test in a different branch.

@mananjadhav
Copy link
Collaborator

I tested in this PR branch.

@nkdengineer
Copy link
Contributor

@mananjadhav I still can reproduce this bug in this branch #41559 without merging main.

Screen.Recording.2024-05-20.at.13.18.35.mov

@melvin-bot melvin-bot bot added the Overdue label May 20, 2024
Copy link

melvin-bot bot commented May 20, 2024

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

@mananjadhav
Copy link
Collaborator

@nkdengineer This is when I tested on xero-merge-freeze branch.

Screen.Recording.2024-05-22.at.4.55.33.AM.mov

@melvin-bot melvin-bot bot removed the Overdue label May 21, 2024
@nkdengineer
Copy link
Contributor

@mananjadhav To reproduce this bug, we should add the tag immediately after we enable the tag and then when we open the setting we can see the custom tag name is empty as my video above #42205 (comment)

@mananjadhav
Copy link
Collaborator

That was an accidental click during recording. I tried without that as well.

@nkdengineer
Copy link
Contributor

@mananjadhav Please try to inspect network element, if you create a tag before EnablePolicyTag API is complete you can reproduce this bug.

Copy link

melvin-bot bot commented May 23, 2024

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

Copy link

melvin-bot bot commented May 27, 2024

@garrettmknight, @mananjadhav Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label May 27, 2024
@garrettmknight
Copy link
Contributor

@mananjadhav can you try to reproduce with the update?

@mananjadhav
Copy link
Collaborator

I am able to consistently reproduce that wasn't the problem. I just wasn't sure of the root cause.

@nkdengineer's proposal works.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented May 28, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 28, 2024
Copy link

melvin-bot bot commented May 28, 2024

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

@nkdengineer
Copy link
Contributor

@mananjadhav The PR is here.

@mananjadhav
Copy link
Collaborator

Done with the PR review and the checklist.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 4, 2024
@melvin-bot melvin-bot bot changed the title [$250] Tags settings – Unable to add Custom tag name in a new workspace [HOLD for payment 2024-06-11] [$250] Tags settings – Unable to add Custom tag name in a new workspace Jun 4, 2024
Copy link

melvin-bot bot commented Jun 4, 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 Jun 4, 2024
Copy link

melvin-bot bot commented Jun 4, 2024

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

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

Copy link

melvin-bot bot commented Jun 4, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@mananjadhav] The PR that introduced the bug has been identified. Link to the PR:
  • [@mananjadhav] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@mananjadhav] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@mananjadhav] Determine if we should create a regression test for this bug.
  • [@mananjadhav] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

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 Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Release 1: Spring 2024 (May)
Development

No branches or pull requests

5 participants