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-08-19] [$250] Tag no longer valid appears on optional multilevel tag after changing a required tag #46789

Closed
1 of 6 tasks
m-natarajan opened this issue Aug 5, 2024 · 15 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

@m-natarajan
Copy link

m-natarajan commented Aug 5, 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: 9.0.15-6
Reproducible in staging?: y
Reproducible in production?: y
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: @cead22
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1722618234255979

Action Performed:

  1. Enable multiple levels of tag (oldDot)
  2. Import the tags from Implement violations for mutiple tag lists #37117 (oldDot)
  3. Mark the first two tags not required (oldDot)
  4. Submit expense > Enter amount > Enter merchant > Submit
  5. Open the expense preview
  6. Select a project from the project multi-tag

Expected Result:

Violation shouldn't show

Actual Result:

Tag no longer valid violation appears on optional multilevel tag after changing a required tag

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

Recording.3151.mp4
354648146-67fa07af-feee-41f5-ba07-39f10c385840.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b480770995fdef2d
  • Upwork Job ID: 1820487238490623314
  • Last Price Increase: 2024-08-05
  • Automatic offers:
    • ikevin127 | Reviewer | 103410889
    • nkdengineer | Contributor | 103410890
Issue OwnerCurrent Issue Owner: @OfstadC
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 5, 2024
Copy link

melvin-bot bot commented Aug 5, 2024

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

@cead22 cead22 self-assigned this Aug 5, 2024
@cead22 cead22 added the External Added to denote the issue can be worked on by a contributor label Aug 5, 2024
Copy link

melvin-bot bot commented Aug 5, 2024

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

@melvin-bot melvin-bot bot changed the title Tag no longer valid appears on optional multilevel tag after changing a required tag [$250] Tag no longer valid appears on optional multilevel tag after changing a required tag Aug 5, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 5, 2024
Copy link

melvin-bot bot commented Aug 5, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

Tag no longer valid violation appears on optional multilevel tag after changing a required tag

What is the root cause of that problem?

The multi-level tag has the format A:B:C, when we only select C, the tag is stored in the transaction as ::C

const selectedTags = transaction.tag?.split(CONST.COLON) ?? [];

Then the selectedTags here is ['', '', 'C']

const selectedTags = transaction.tag?.split(CONST.COLON) ?? [];

That makes isTagInPolicy is false for the first selected tag then the violation is added and shown in the money request view
if (!isTagInPolicy) {

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

If the selectedTag tag here is empty, we shouldn't add the violation since we passed the required tag check below and it can be empty

const selectedTag = selectedTags[i];

if (!isTagInPolicy && selectedTag) {

if (!isTagInPolicy) {

What alternative solutions did you explore? (Optional)

@ikevin127
Copy link
Contributor

@nkdengineer's proposal LGTM 🚀 -> All points mentioned in the RCA check-out and the proposed solution fixes the issue accordingly, fulfilling the Expected result of the issue.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Aug 6, 2024

Current assignee @cead22 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 Aug 6, 2024
Copy link

melvin-bot bot commented Aug 6, 2024

📣 @ikevin127 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Aug 6, 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Aug 6, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 12, 2024
@melvin-bot melvin-bot bot changed the title [$250] Tag no longer valid appears on optional multilevel tag after changing a required tag [HOLD for payment 2024-08-19] [$250] Tag no longer valid appears on optional multilevel tag after changing a required tag Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 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 Aug 12, 2024
Copy link

melvin-bot bot commented Aug 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.18-10 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-08-19. 🎊

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

Copy link

melvin-bot bot commented Aug 12, 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:

  • [@ikevin127] The PR that introduced the bug has been identified. Link to the PR:
  • [@ikevin127] 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:
  • [@ikevin127] 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:
  • [@ikevin127] Determine if we should create a regression test for this bug.
  • [@ikevin127] 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.
  • [@OfstadC] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@ikevin127
Copy link
Contributor

  • [@ikevin127] The PR that introduced the bug has been identified. Link to the PR:
  • [@ikevin127] 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:
  • [@ikevin127] 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:
  • [@ikevin127] Determine if we should create a regression test for this bug.
  • [@ikevin127] 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.

Regression Test Proposal

  1. OD: Enable multiple levels of tag on.
  2. OD: Import the tags from Implement violations for mutiple tag lists #37117 (comment).
  3. OD: Mark the first two tags not required.
  4. Submit expense > Enter amount > Enter merchant > Submit.
  5. Open the expense detail.
  6. Select a city from the required City multi-tag field.
  7. Verify that a violation doesn't show on any on the non-required fields (Category, State, Region) after changing the City.

Do we agree 👍 or 👎.

@cead22
Copy link
Contributor

cead22 commented Aug 12, 2024

We have a pretty comprehensive list of tests for violations now, which should cover this, righ @isagoico ?

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 18, 2024
@ikevin127

This comment was marked as resolved.

@OfstadC
Copy link
Contributor

OfstadC commented Aug 19, 2024

Payment Summary

@ikevin127 paid $250 via Upwork
@nkdengineer paid $250 via Upwork

Sounds like we don't need regression testing here - so I'll close. But if that changes, feel free to tag me and i'll create an issue 😃

@OfstadC OfstadC closed this as completed Aug 19, 2024
@melvin-bot melvin-bot bot removed the Overdue label Aug 19, 2024
@github-project-automation github-project-automation bot moved this from Polish to Done in [#whatsnext] #wave-collect Aug 19, 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

5 participants