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-02-26] [$500] [MEDIUM] [Backwards Compatibility] Expense with category can be created when admin disable the same category #35236

Closed
3 of 6 tasks
kbecciv opened this issue Jan 26, 2024 · 29 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

@kbecciv
Copy link

kbecciv commented Jan 26, 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.32-2
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: Applause - internal Team
Slack conversation:

Action Performed:

Precondition:
User is an employee of Collect workspace on Old Dot which has categories set
Steps:

  1. On collect workspace chat Employee starts manual request flow
  2. On confirmation page select any category
  3. Admin disable the same category on Old Dot
  4. Employee complete the IOU flow successfully

Expected Result:

Selected category on confirmation page should disappear/error message should be displayed

Actual Result:

User can successfully create the IOU request

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

Bug6355608_1706263008737.Gravar__1942.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~010fa29b3491c11700
  • Upwork Job ID: 1750851608721940480
  • Last Price Increase: 2024-01-26
  • Automatic offers:
    • c3024 | Reviewer | 28131001
    • dukenv0307 | Contributor | 28131002
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 26, 2024
@melvin-bot melvin-bot bot changed the title IOU - IOU with category can be created when admin disable the same category [$500] IOU - IOU with category can be created when admin disable the same category Jan 26, 2024
Copy link

melvin-bot bot commented Jan 26, 2024

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

Copy link

melvin-bot bot commented Jan 26, 2024

Triggered auto assignment to @mallenexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

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

melvin-bot bot commented Jan 26, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Jan 26, 2024

We think that this bug might be related to #wave6-collect-submitters
CC @greg-schroeder

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 26, 2024

Proposal

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

User can successfully create the IOU request

What is the root cause of that problem?

We're not clearing the transaction.category if the category is already selected in Request Money flow, but then admin disables the category in settings.

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

Clearing the transaction.category by IOU.resetMoneyRequestCategory_temporaryForRefactor(transactionID); if the category is already selected in Request Money flow, but then admin disables the category in settings.

We can check if the transaction.category corresponds to a category that has enabled: false in policyCategories

We can do this in IOURequestStepCategory (in an useEffect), or have a Onyx.connect in a separate util file to listen to policyCategories changes and do the above for the draft transaction.

What alternative solutions did you explore? (Optional)

An alternate UX is that we don't clear the already-selected category, because it might be confusing to the user. Instead we'll set a formError in the MoneyTemporaryForRefactorRequestConfirmationList telling the user that the selected category has been disabled, and request the user to select another category. The error will show up above the button and also in the MenuItemWithTopDescription of the Category on that page.

But this will be based on the same above condition.

@Santhosh-Sellavel
Copy link
Collaborator

OOO Next week, So unassigning. Please assign a new C+ Issue here.

cc: @mallenexpensify

@Santhosh-Sellavel Santhosh-Sellavel removed their assignment Jan 27, 2024
@mallenexpensify mallenexpensify added External Added to denote the issue can be worked on by a contributor and removed External Added to denote the issue can be worked on by a contributor labels Jan 27, 2024
Copy link

melvin-bot bot commented Jan 27, 2024

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

@mallenexpensify
Copy link
Contributor

@c3024 plz review the proposal above. Thx

@mallenexpensify
Copy link
Contributor

We think that this bug might be related to #wave6-collect-submitters
CC @greg-schroeder

Agree with @kbecciv , added to Wave 6 project, comment if you disagree @greg-schroeder. Thx!

@c3024
Copy link
Contributor

c3024 commented Jan 27, 2024

I think the alternative solution is the way to go because before confirming the request we got the details of enabled categories. So, showing the error at category and the confirm button is the better solution.

categoryRequest.mp4

I think we should change the category page as well to include only the enabled categories notwithstanding the earlier selected category.

categoryPage.mp4

Proposal here by @dukenv0307 looks good to me.

🎀 👀 🎀 C+ Reviewed

@c3024
Copy link
Contributor

c3024 commented Jan 27, 2024

No internal engineer assigned. 🤔

🎀 👀 🎀 C+ Reviewed

Copy link

melvin-bot bot commented Jan 27, 2024

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

@mallenexpensify
Copy link
Contributor

@Gonals plz review when you have a minute.

@melvin-bot melvin-bot bot removed the Overdue label Jan 30, 2024
@greg-schroeder
Copy link
Contributor

@amyevans given you worked on categories - do you know if this was considered or might be handled elsewhere already?

@amyevans
Copy link
Contributor

@amyevans given you worked on categories - do you know if this was considered or might be handled elsewhere already?

Nope as far as I know this is an edge case we didn't consider/handle yet cc @yuwenmemon

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 19, 2024
@melvin-bot melvin-bot bot changed the title [$500] [MEDIUM] IOU - IOU with category can be created when admin disable the same category [HOLD for payment 2024-02-26] [$500] [MEDIUM] IOU - IOU with category can be created when admin disable the same category Feb 19, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 19, 2024
Copy link

melvin-bot bot commented Feb 19, 2024

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

Copy link

melvin-bot bot commented Feb 19, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.42-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-02-26. 🎊

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

Copy link

melvin-bot bot commented Feb 19, 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:

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

@greg-schroeder greg-schroeder changed the title [HOLD for payment 2024-02-26] [$500] [MEDIUM] IOU - IOU with category can be created when admin disable the same category [HOLD for payment 2024-02-26] [$500] [MEDIUM] Backwards Compatibility: Expense with category can be created when admin disable the same category Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Daily KSv2 and removed Weekly KSv2 labels Feb 20, 2024
@c3024
Copy link
Contributor

c3024 commented Feb 27, 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:

  • [@c3024] The PR that introduced the bug has been identified. Link to the PR: This is a case where a user starts a money request flow and before it is completed, the admin removes a category from the policy on Old dot. The user can finish the money request and the money request page shows an error saying "The category is not valid".
    PR of this issue fixed it by resetting the category field if a category field is deleted during the request flow. As such, this is an edge case and no specific PR can be held responsible.
  • [@c3024] 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: NA
  • [@c3024] 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: Not started because such discussion does not appear to be helpful for these cases.
  • [@c3024] Determine if we should create a regression test for this bug. No because this is an edge case and does not appear to affect user experience adversely meaningfully.
  • [@c3024] 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. NA

Copy link

melvin-bot bot commented Mar 5, 2024

@Gonals, @mallenexpensify, @c3024, @dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Copy link

melvin-bot bot commented Mar 5, 2024

@Gonals, @mallenexpensify, @c3024, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick!

@trjExpensify trjExpensify changed the title [HOLD for payment 2024-02-26] [$500] [MEDIUM] Backwards Compatibility: Expense with category can be created when admin disable the same category [HOLD for payment 2024-02-26] [$500] [MEDIUM] [Backwards Compatibility] Expense with category can be created when admin disable the same category Mar 5, 2024
@trjExpensify trjExpensify moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collect Mar 5, 2024
@mallenexpensify mallenexpensify removed the Reviewing Has a PR in review label Mar 6, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 6, 2024
@mallenexpensify
Copy link
Contributor

Contributor: @dukenv0307 paid $500 via Upwork
Contributor+: @c3024 paid $500 via Upwork.

@c3024 , what's the reason for thinking we don't want a regression test for this?

@melvin-bot melvin-bot bot removed the Overdue label Mar 6, 2024
@c3024
Copy link
Contributor

c3024 commented Mar 8, 2024

@mallenexpensify

This happens when a user is at the money request confirm page

Screenshot 2024-03-08 at 12 09 50 PM

and selects a category. Before this user presses the Request button, an admin of the workspace disables the same category from Old Dot.

A user ordinarily stays on this page for a brief time. During that brief period an admin should remove/disable the same category that was chosen by the user for this bug to happen. It appeared to me as a rare case so I felt it does not need a regression test.

@mallenexpensify
Copy link
Contributor

Thanks @c3024 , I agree it's an edge case. QA has a separate list for edge case tests (and design ones) that they only run monthly, I assume we'll want it for that, created an issue.
https://github.com/Expensify/Expensify/issues/377286

@github-project-automation github-project-automation bot moved this from Release 1: Spring 2024 (May) to Done in [#whatsnext] #wave-collect Mar 10, 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
Development

No branches or pull requests

9 participants