Skip to content

[HOLD for payment 2025-01-21] [$250] Desktop - Track expense - Hmm... it's not here after selecting the Categorize it option #54864

Closed

Description

@IuliiaHerets

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: v9.0.81-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5420258&group_by=cases:section_id&group_order=asc&group_id=309130
Email or phone of affected tester (no customers): n/a
Issue reported by: Applause Internal Team
Device used: Mac 15.2
App Component: Other

Action Performed:

  1. Open the app
  2. Login with a user with workspaces
  3. Delete all WS
  4. Submit a track expense in the self DM
  5. Click on Categorize it in the actionable menu

Expected Result:

The Upgrade option is displayed after selecting the "Categorize it" option in the actionable menu in the account without workspaces

Actual Result:

Hmm... it's not here is displayed after selecting the "Categorize it" option in the account where all workspaces were deleted. The modal with the Upgrade option is displayed after selecting the "Clear cache and restart" option in Troubleshoot

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6707701_1736209708374.Recording__346.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021876588733605475971
  • Upwork Job ID: 1876588733605475971
  • Last Price Increase: 2025-01-07
  • Automatic offers:
    • ZhenjaHorbach | Reviewer | 105628313
    • mkzie2 | Contributor | 105628314
Issue OwnerCurrent Issue Owner: @twisterdotcom

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 7, 2025
  2. melvin-bot commented on Jan 7, 2025

    @melvin-bot

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

  3. mkzie2 commented on Jan 7, 2025

    @mkzie2
    Contributor

    Edited by proposal-police: This proposal was edited at 2025-01-07 10:02:37 UTC.

    Proposal

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

    Hmm... it's not here is displayed after selecting the "Categorize it" option in the account where all workspaces were deleted. The modal with the Upgrade option is displayed after selecting the "Clear cache and restart" option in Troubleshoot

    What is the root cause of that problem?

    After we delete the default workspace, the activePolicy data still exists with three fields then we still go to the category page then the not found page appear based on AccessOrNotFoundWrapper

    if (activePolicy && activePolicy?.type !== CONST.POLICY.TYPE.PERSONAL && activePolicy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {

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

    We should use shouldShow policy function to check whether the policy is valid or not. That has already covered the personal policy and pending delete case.

    if (PolicyUtils.shouldShowPolicy(activePolicy, false, currentUserEmail)) {
    

    if (activePolicy && activePolicy?.type !== CONST.POLICY.TYPE.PERSONAL && activePolicy?.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {

    We also need to do the same here to filter out the invalid policy above

    const filteredPolicies = Object.values(allPolicies ?? {}).filter(
        (policy) => PolicyUtils.shouldShowPolicy(policy, false, currentUserEmail),
    );
    

    (policy) => policy && policy.type !== CONST.POLICY.TYPE.PERSONAL && policy.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    What alternative solutions did you explore? (Optional)

    Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jan 7, 2025
  5. melvin-bot commented on Jan 7, 2025

    @melvin-bot
  6. changed the title [-]Desktop - Track expense - Hmm... it's not here after selecting the Categorize it option[/-] [+][$250] Desktop - Track expense - Hmm... it's not here after selecting the Categorize it option[/+] on Jan 7, 2025
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jan 7, 2025
  8. melvin-bot commented on Jan 7, 2025

    @melvin-bot

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

  9. twisterdotcom commented on Jan 7, 2025

    @twisterdotcom
    Contributor

    Recreated in Chrome too.

    54864.mp4
  10. ZhenjaHorbach commented on Jan 7, 2025

    @ZhenjaHorbach
    Contributor

    Yeah
    Agree
    This can easily be reproduced on the web also

    @mkzie2
    And thanks for your proposal !
    The proposal makes sense to me and works well !

    🎀👀🎀 C+ reviewed

    Plus I also noticed that we also use the old logic in hasNoPolicyOtherThanPersonalType util that is not used anywhere else

    App/src/libs/PolicyUtils.ts

    Lines 1101 to 1106 in cf9a023

    function hasNoPolicyOtherThanPersonalType() {
    return (
    Object.values(allPolicies ?? {}).filter((policy) => policy && policy.type !== CONST.POLICY.TYPE.PERSONAL && policy.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE)
    .length === 0
    );
    }

    So we can remove it as well

  11. melvin-bot commented on Jan 7, 2025

    @melvin-bot

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

  12. 10 remaining items

  13. jjcoffee commented on Jan 13, 2025

    @jjcoffee
    Contributor

    This is a dupe of #53659.

  14. twisterdotcom commented on Jan 13, 2025

    @twisterdotcom
    Contributor

    We're going to go ahead with this one for the fix, and @jjcoffee and @truph01 will handle unit tests in #53659

  15. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Jan 14, 2025
  16. changed the title [-][$250] Desktop - Track expense - Hmm... it's not here after selecting the Categorize it option[/-] [+][HOLD for payment 2025-01-21] [$250] Desktop - Track expense - Hmm... it's not here after selecting the Categorize it option[/+] on Jan 14, 2025
  17. melvin-bot commented on Jan 14, 2025

    @melvin-bot

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

  18. melvin-bot commented on Jan 14, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.84-7 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 2025-01-21. 🎊

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

  19. melvin-bot commented on Jan 14, 2025

    @melvin-bot

    @ZhenjaHorbach @twisterdotcom @ZhenjaHorbach The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

  20. ZhenjaHorbach commented on Jan 20, 2025

    @ZhenjaHorbach
    Contributor

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
    • 2b. Reported on staging (eg. found during regression or PR testing)
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: https://github.com/Expensify/App/pull/52737/files#r1922352573

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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.

      NA

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Test:

    Precondition: The user has only one active group workspace

    1. Create a track expense
    2. Delete the workspace
    3. Go to the selfDM and categorize it
    4. Verify that the upgrade page appears

    Do we agree 👍 or 👎

  21. twisterdotcom commented on Jan 21, 2025

    @twisterdotcom
    Contributor

    Payment Summary:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions