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-10-14] [$250] Categories - RBR appears next to workspace after selecting the deleted spend category offline #49295

Closed
6 tasks done
IuliiaHerets opened this issue Sep 16, 2024 · 22 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

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 16, 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.35-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Workspace settings > Categories.
  3. Go offline.
  4. Delete "Travel" category (because it is linked to "Airlines" spend).
  5. Click Settings.
  6. Click Airlines.
  7. Click Uncategorized.
  8. Go online.
  9. Go back to workspace list.

Expected Result:

There will not be RBR next to the workspace.

Actual Result:

RBR appears next to the workspace after selecting the deleted spend category offline, but there is no error message anywhere.

Workaround:

Unknown

Platforms:

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6604548_1726420009054.20240916_010231.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021838337226742068992
  • Upwork Job ID: 1838337226742068992
  • Last Price Increase: 2024-09-23
  • Automatic offers:
    • Krishna2323 | Contributor | 104134153
Issue OwnerCurrent Issue Owner: @RachCHopkins
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 16, 2024
Copy link

melvin-bot bot commented Sep 16, 2024

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

@IuliiaHerets
Copy link
Author

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

@Krishna2323
Copy link
Contributor

Proposal


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

Categories - RBR appears next to workspace after selecting the deleted spend category offline.

What is the root cause of that problem?

  • Before calling setWorkspaceDefaultSpendCategory we don't check if the new selected category is same as the current one.
  • Because we don't check match updated and current category we call setWorkspaceDefaultSpendCategory with the deleted category and backend returns error.
    const setNewCategory = (selectedCategory: ListItem) => {
    if (!selectedCategory.keyForList) {
    return;
    }
    Policy.setWorkspaceDefaultSpendCategory(policyID, groupID, selectedCategory.keyForList);
    };

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


We should check the current category and the selected category and if they are the same then we shouldn't call setWorkspaceDefaultSpendCategory.

    const setNewCategory = (selectedCategory: ListItem) => {
        if (!selectedCategory.keyForList || selectedCategory.keyForList===categoryID) {
            return;
        }

        Policy.setWorkspaceDefaultSpendCategory(policyID, groupID, selectedCategory.keyForList);
    };

What alternative solutions did you explore? (Optional)

Result

@RachCHopkins
Copy link
Contributor

Ok, so we are saying that if you set an MCC default, then delete the category you set, it shows as Uncategorised and has a red dot with no error message.

I would think that if we think that people will be deleting their categories offline, and causing the MCC default to break, the solution would be displaying an error of some variety.

I don't think this is a "real" problem that users will encounter, but hey, let's pretend they are working from somewhere with dodgy reception and they happen to be doing major surgery on their categories, then it should behave the same as it would if they were online.

Unfortunately I can't seem to work out what that is. @IuliiaHerets how are you seeing the MCC defaults? Is there a prerequisite that's not on the OP there? I can't see this on Collect or Control.

image

@RachCHopkins
Copy link
Contributor

Asked in Slack.

@Krishna2323
Copy link
Contributor

@RachCHopkins, the RBR occurs only if we selected the deleted category again, the RBR does not occur on initial deletion of the category.

@melvin-bot melvin-bot bot added the Overdue label Sep 23, 2024
Copy link

melvin-bot bot commented Sep 23, 2024

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

@RachCHopkins
Copy link
Contributor

Ok, I still can't replicate this. I'm going to have to assume that it's ok.

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

melvin-bot bot commented Sep 23, 2024

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

@melvin-bot melvin-bot bot changed the title Categories - RBR appears next to workspace after selecting the deleted spend category offline [$250] Categories - RBR appears next to workspace after selecting the deleted spend category offline Sep 23, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 23, 2024
Copy link

melvin-bot bot commented Sep 23, 2024

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

@s77rt
Copy link
Contributor

s77rt commented Sep 24, 2024

@Krishna2323 Thanks for the proposal. The RCA and the solution makes sense to me.

🎀 👀 🎀 C+ reviewed
Link to proposal

Copy link

melvin-bot bot commented Sep 24, 2024

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

@NikkiWines
Copy link
Contributor

Agreed, @Krishna2323's proposal looks good 👍

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

melvin-bot bot commented Sep 26, 2024

📣 @Krishna2323 🎉 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 the Weekly KSv2 label Sep 28, 2024
@Krishna2323
Copy link
Contributor

@s77rt, PR ready for review.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 7, 2024
@melvin-bot melvin-bot bot changed the title [$250] Categories - RBR appears next to workspace after selecting the deleted spend category offline [HOLD for payment 2024-10-14] [$250] Categories - RBR appears next to workspace after selecting the deleted spend category offline Oct 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 7, 2024
Copy link

melvin-bot bot commented Oct 7, 2024

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

Copy link

melvin-bot bot commented Oct 7, 2024

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

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

Copy link

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

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

@s77rt
Copy link
Contributor

s77rt commented Oct 11, 2024

@RachCHopkins
Copy link
Contributor

Payment Summary:

  • Contributor: @Krishna2323 to be paid $250 via Upwork
  • Contributor+: @s77rt to be paid $250 via NewDot manual request

Upwork job here

@RachCHopkins
Copy link
Contributor

Contributor has been paid, the contract has been completed, and the Upwork post has been closed.

@JmillsExpensify
Copy link

$250 approved for @s77rt

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
Archived in project
Development

No branches or pull requests

6 participants