Skip to content

[PAID][$250] QBO - Main and sub tags disappear after renaming main tag with same name as other main tag #46283

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

Closed
6 tasks done
lanitochka17 opened this issue Jul 26, 2024 · 41 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 26, 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: 9.0.13-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: N/A
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • Workspace is connected to QBO
  • Multi tags are imported from QBO
  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Tags
  3. Click on any main tag
  4. Click on the name field
  5. Enter the same main tag name as the other main tag and save it

Expected Result:

App will throw an error that the existing name has already been used

Actual Result:

App does not throw an error. The other main tag together with the sub tags disappears and the sub tags become standard tags (no longer multi 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

Bug6552852_1721924678094.20240726_001940.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010ff59768d2accba6
  • Upwork Job ID: 1818882074670225826
  • Last Price Increase: 2024-08-08
Issue OwnerCurrent Issue Owner: @strepanier03
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 26, 2024
Copy link

melvin-bot bot commented Jul 26, 2024

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

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

@lanitochka17
Copy link
Author

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

@melvin-bot melvin-bot bot added the Overdue label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

Copy link

melvin-bot bot commented Jul 31, 2024

@strepanier03 Huh... This is 4 days overdue. Who can take care of this?

@strepanier03
Copy link
Contributor

Tested this today and the tag list functions as described in the OP comment. Able to repro easily.

@melvin-bot melvin-bot bot removed the Overdue label Aug 1, 2024
@strepanier03 strepanier03 added the External Added to denote the issue can be worked on by a contributor label Aug 1, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

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

@melvin-bot melvin-bot bot changed the title QBO - Main and sub tags disappear after renaming main tag with same name as other main tag [$250] QBO - Main and sub tags disappear after renaming main tag with same name as other main tag Aug 1, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 1, 2024
Copy link

melvin-bot bot commented Aug 1, 2024

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

@strepanier03
Copy link
Contributor

I'm not sure if this external but we can update the label if needed.

@daledah
Copy link
Contributor

daledah commented Aug 1, 2024

Edited by proposal-police: This proposal was edited at 2023-10-10 21:05:46.

Proposal

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

App does not throw an error. The other main tag together with the sub tags disappears and the sub tags become standard tags (no longer multi tags)

What is the root cause of that problem?

In

, there's no validation for duplicate tag list name.

So the user is able to save the Tag list name with duplicate name, this is the root cause of the issue.

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

In

, add validation for duplicate tag list name.

So first we have the list of tag from Object.values(policyTagList), then we need to filter out all tag that have different orderWeight from the tag we're editing, we can filter out the tags based on having different orderWeight from route.params.orderWeight

Now we get their name attribute of them, and if values[INPUT_IDS.POLICY_TAGS_NAME] here does not match any of that name, return an error like This name is already in use, please select another name

Sample code to add in

if (Object.values(policyTags).find((tag) => tag.orderWeight !== route.params.orderWeight && tag.name === values[INPUT_IDS.POLICY_TAGS_NAME])) {
    errors[INPUT_IDS.POLICY_TAGS_NAME] = translate('workspace.tags.existingTagError');
}

policyTags needs to be added in dependency list here. We can trim (& maybe lowercase) both name value before comparing if needed. The error text copy can be adjusted if needed.

We could optionally update the RenamePolicyTaglist back-end API to validate this too, but front-end validation should already be enough to prevent users from encountering this issue.

What alternative solutions did you explore? (Optional)

@daledah
Copy link
Contributor

daledah commented Aug 1, 2024

Proposal edited to add sample code

@Ollyws
Copy link
Contributor

Ollyws commented Aug 2, 2024

Should this not be validated on the backend by the RenamePolicyTaglist request?

Copy link

melvin-bot bot commented Aug 5, 2024

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

@melvin-bot melvin-bot bot added the Overdue label Aug 5, 2024
@daledah
Copy link
Contributor

daledah commented Aug 6, 2024

Should this not be validated on the backend by the RenamePolicyTaglist request?

@Ollyws It should ideally be validated in back-end too. But we'll need to validate it in the front-end regardless. I've updated the proposal to mention the optional back-end fix

Copy link

melvin-bot bot commented Aug 7, 2024

@strepanier03, @Ollyws Huh... This is 4 days overdue. Who can take care of this?

@Ollyws
Copy link
Contributor

Ollyws commented Aug 8, 2024

Yes I agree that we should do both, will get to this asap.

@melvin-bot melvin-bot bot removed the Overdue label Aug 8, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Aug 8, 2024

@strepanier03 Could we assign an internal engineer here? It will need some backend work but we should possibly do some validation on the front-end too. Thanks!

Copy link

melvin-bot bot commented Aug 8, 2024

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

@daledah
Copy link
Contributor

daledah commented Aug 14, 2024

@Ollyws This PR is ready for review.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 14, 2024
@Ollyws
Copy link
Contributor

Ollyws commented Aug 23, 2024

This is due for payment monday but for some reason the automation isn't working.

@rlinoz rlinoz changed the title [$250] QBO - Main and sub tags disappear after renaming main tag with same name as other main tag [Awaiting payment 2024-08-26][$250] QBO - Main and sub tags disappear after renaming main tag with same name as other main tag Aug 23, 2024
@rlinoz rlinoz added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Aug 23, 2024
Copy link

melvin-bot bot commented Aug 23, 2024

@rlinoz @strepanier03 @Ollyws @daledah this issue is now 4 weeks old, please consider:

  • Finding a contributor to fix the bug
  • Closing the issue if BZ has been unable to add the issue to a VIP or Wave project
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@Ollyws
Copy link
Contributor

Ollyws commented Aug 26, 2024

We should create a regression test with the following steps:

Precondition:
Workspace is connected to QBO
Multi tags are imported from QBO

1. Go to Workspace Settings > Tags
2. Click on any main tag
3. Click on the name field
4. Enter the same main tag name as the other main tag and save it
5. Verify that: Error appears instead of renaming successfully

@Ollyws
Copy link
Contributor

Ollyws commented Aug 26, 2024

Requested in ND. @strepanier03 Could we get a payment summary? Thanks!

@garrettmknight garrettmknight added Daily KSv2 and removed Weekly KSv2 labels Aug 28, 2024
@garrettmknight
Copy link
Contributor

@strepanier03 mind popping the payment summary in here when you get a chance?

@strepanier03
Copy link
Contributor

Aaah, missed this one with the failed automation. Sorry about that everyone.

Doing the payment summary now.

@strepanier03
Copy link
Contributor

strepanier03 commented Aug 28, 2024

Payment Summary

  • $250 - @Ollyws via New Expensify manual request
  • $250 - @daledah via Upwork - Please apply for the job here or share your Upwork profile with me so I can hire you.

@garrettmknight - All your's!

@strepanier03
Copy link
Contributor

I'll check later this afternoon for the Upwork job.

@garrettmknight
Copy link
Contributor

$250 approved for @Ollyws

@strepanier03
Copy link
Contributor

@daledah - Bump on sharing your Upwork profile with me or applying for the job. Thanks!

@daledah
Copy link
Contributor

daledah commented Aug 29, 2024

@strepanier03 Here's my profile https://www.upwork.com/freelancers/~0138d999529f34d33f, could you help send the offer? Thx

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Aug 29, 2024
@strepanier03
Copy link
Contributor

@daledah - I've just sent over the offer.

@daledah
Copy link
Contributor

daledah commented Aug 30, 2024

@strepanier03 I accepted it 🙏

@strepanier03
Copy link
Contributor

Finishing up now.

@strepanier03
Copy link
Contributor

Paid and closed the contract, thanks everyone!

@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect Aug 30, 2024
@strepanier03 strepanier03 changed the title [Awaiting payment 2024-08-26][$250] QBO - Main and sub tags disappear after renaming main tag with same name as other main tag [PAID][$250] QBO - Main and sub tags disappear after renaming main tag with same name as other main tag Aug 30, 2024
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. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Status: Done
Development

No branches or pull requests

6 participants