Skip to content

[Due for payment 2025-04-16] [Report Creation UI] Create report button opens empty workspace selection page when there is no workspace #59339

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
8 tasks done
IuliiaHerets opened this issue Mar 31, 2025 · 17 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Mar 31, 2025

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.1.21-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Mac 15.3 / Chrome
App Component: Other

Action Performed:

Precondition:

  • Log in with Expensifail account.
  • Account has no workspace.
  1. Go to staging.new.expensify.com
  2. Open FAB.
  3. Click Create report.

Expected Result:

App will show "Coming soon" modal with Switch to Expensify Classic option.

Actual Result:

App opens empty workspace selection page.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6787844_1743418835897.Screen_Recording_2025-03-31_at_18.38.29.mp4

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @sakluger
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. DeployBlocker Indicates it should block deploying the API labels Mar 31, 2025
Copy link

melvin-bot bot commented Mar 31, 2025

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

@Krishna2323
Copy link
Contributor

Proposal

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

Create report button opens empty workspace selection page when there is no workspace

What is the root cause of that problem?

  • We return false when groupPolicies.length === 0 is true but that's wrong because in that case we should be returning true.

    App/src/libs/PolicyUtils.ts

    Lines 1260 to 1266 in b5807fa

    function areAllGroupPoliciesExpenseChatDisabled(policies = allPolicies) {
    const groupPolicies = Object.values(policies ?? {}).filter((policy) => isPaidGroupPolicy(policy));
    if (groupPolicies.length === 0) {
    return false;
    }
    return !groupPolicies.some((policy) => !!policy?.isPolicyExpenseChatEnabled);
    }

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

  • Update the function to:
function areAllGroupPoliciesExpenseChatDisabled(policies = allPolicies) {
    const groupPolicies = Object.values(policies ?? {}).filter((policy) => isPaidGroupPolicy(policy));
    if (groupPolicies.length === 0) {
        return true;
    }
    return !groupPolicies.some((policy) => !!policy?.isPolicyExpenseChatEnabled);
}

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

  • We can create a test for areAllGroupPoliciesExpenseChatDisabled and pass dummy policies with different values.

What alternative solutions did you explore? (Optional)

NA

Result

Copy link

melvin-bot bot commented Mar 31, 2025

⚠️ 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.

@SzymczakJ
Copy link
Contributor

This is part of Crate Report follow-ups issue, we will solve this issue in it. Therefore this issue can be closed in favor of that issue cc @mountiny @luacmartins .

@IuliiaHerets IuliiaHerets added the DeployBlockerCash This issue or pull request should block deployment label Mar 31, 2025
Copy link

melvin-bot bot commented Mar 31, 2025

Triggered auto assignment to @dangrous (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Mar 31, 2025

💬 A slack conversation has been started in #expensify-open-source

@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Mar 31, 2025
Copy link
Contributor

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@IuliiaHerets
Copy link
Author

I added 2 blocker labels, because some testers can repro this issue with staging server off, some - not.

@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 DeployBlocker Indicates it should block deploying the API labels Mar 31, 2025
@mountiny mountiny changed the title Create report button opens empty workspace selection page when there is no workspace [Report Creation UI] Create report button opens empty workspace selection page when there is no workspace Mar 31, 2025
@mountiny mountiny moved this to Second Cohort - CRITICAL in [#whatsnext] #migrate Mar 31, 2025
@mountiny
Copy link
Contributor

@SzymczakJ Since its already opened, lets keep it for easier tracking

@sakluger
Copy link
Contributor

sakluger commented Apr 2, 2025

@mountiny what's the deal with this one? It looks like you have already assigned folks to work on it, I'm guessing we don't need contributor proposals, right?

@melvin-bot melvin-bot bot added the Overdue label Apr 2, 2025
@trjExpensify
Copy link
Contributor

Fix is coming here: #59386

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Apr 3, 2025
@allgandalf
Copy link
Contributor

please assign @DylanDylann here and remove my assignment, they are reviewing the PR

@mountiny mountiny assigned DylanDylann and unassigned allgandalf Apr 4, 2025
@allgandalf
Copy link
Contributor

taking it back againnnn

@mountiny mountiny assigned allgandalf and unassigned DylanDylann Apr 4, 2025
@mountiny
Copy link
Contributor

mountiny commented Apr 5, 2025

PR closed, we will handle the QA on the PR with Applause, no payments or regression tests required so closing

@mountiny mountiny closed this as completed Apr 5, 2025
@github-project-automation github-project-automation bot moved this from Second Cohort - CRITICAL to Done in [#whatsnext] #migrate Apr 5, 2025
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Apr 9, 2025
@melvin-bot melvin-bot bot changed the title [Report Creation UI] Create report button opens empty workspace selection page when there is no workspace [Due for payment 2025-04-16] [Report Creation UI] Create report button opens empty workspace selection page when there is no workspace Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 9, 2025
Copy link

melvin-bot bot commented Apr 9, 2025

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

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

  • @SzymczakJ does not require payment (Contractor)
  • @allgandalf requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Apr 9, 2025

@allgandalf @sakluger @allgandalf 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]

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. Engineering Weekly KSv2
Projects
Development

No branches or pull requests

9 participants