Skip to content

Expense - Change Workspace option available for submitted expense #59890

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.1.25-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5901011
Issue reported by: Applause Internal Team
Device used: Windows 10 / Chrome
App Component: Workspace Settings

Action Performed:

Precondition: Employee has 2 workspaces

  1. Open the First WS with 2 expenses in submitted and submit status
  2. Click on the More button on the expense in the Submitted status
  3. Click on the Change Workspace
  4. Change the submitted expense to the second workspace
  5. Click on the More button on the expense in the Submit status
  6. Click on the Change Workspace
  7. Select the second workspace

Expected Result:

The change workspace option only displays for an expense in the Submit status

Actual Result:

The change workspace option display for a submitted expense and after click on it display an error message

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6796887_1744185652889.Change_WS.mp4

View all open jobs on GitHub

Activity

  1. added
    Daily
    DeployBlockerCash
    on Apr 9, 2025
  2. melvin-bot commented on Apr 9, 2025

    @melvin-bot

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

  3. melvin-bot commented on Apr 9, 2025

    @melvin-bot

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

  4. github-actions commented on Apr 9, 2025

    @github-actions
    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.
  5. grgia commented on Apr 9, 2025

    @grgia
    Contributor

    Potential RCA: #58084

  6. jnowakow commented on Apr 9, 2025

    @jnowakow
    Contributor
  7. ChavdaSachin commented on Apr 9, 2025

    @ChavdaSachin
    Contributor

    Proposal

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

    Change Workspace option available for submitted expense

    What is the root cause of that problem?

    RCA for this issue is, whether change workspace option should be visible or not is determined from ReportSecondaryActionUtils.isChangeWorkspaceAction function.
    In which change workspace is made visible even when report is processing ie. submitted/approved but not paid yet.

    const isProcessingReport = isProcessingReportUtils(report);
    if (isReportSubmitter && (isOpenReport || isProcessingReport)) {
    return true;
    }

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

    Remove isProcessingReport and isReportApproved checks here and only show change workspace option for open or closed reports.

        const isOpenReport = isOpenReportUtils(report);
    
        if (isReportSubmitter && isOpenReport) {
            return true;
        }
    
        const isReportApprover = isApproverUtils(policy, getCurrentUserAccountID());
        const isReportPayer = isPayerUtils(getSession(), report, false, policy);
    
        if (isReportPayer && isClosedReport) {
            return true;
        }

    const isOpenReport = isOpenReportUtils(report);
    const isProcessingReport = isProcessingReportUtils(report);
    if (isReportSubmitter && (isOpenReport || isProcessingReport)) {
    return true;
    }
    const isReportApprover = isApproverUtils(policy, getCurrentUserAccountID());
    if (isReportApprover && isProcessingReport) {
    return true;
    }
    const isReportPayer = isPayerUtils(getSession(), report, false, policy);
    const isReportApproved = isReportApprovedUtils({report});
    if (isReportPayer && (isReportApproved || isClosedReport)) {
    return true;
    }

    Also remove isReportApproved check here.

    const isReportFinished = isReportApproved || isReportReimbursed || isClosedReport;

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

    NA

    What alternative solutions did you explore? (Optional)

    NA

  8. added
    Reviewing
    Weekly
    and removed
    Hourly
    on Apr 9, 2025
  9. 16 remaining items

  10. melvin-bot commented on Apr 11, 2025

    @melvin-bot

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

  11. melvin-bot commented on Apr 11, 2025

    @melvin-bot

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

  12. added
    Reviewing
    Weekly
    and removed
    Weekly
    on Apr 15, 2025
  13. removed
    Reviewing
    Awaiting Payment
    on Apr 25, 2025
  14. changed the title [-][Due for payment 2025-04-18] Expense - Change Workspace option available for submitted expense[/-] [+]Expense - Change Workspace option available for submitted expense[/+] on Apr 25, 2025
  15. luacmartins commented on Apr 25, 2025

    @luacmartins
    Contributor

    I'm gonna reopen this since it's still happening. I'm seeing a 401 Not allowed to set this magic reportNameValuePair error in the API. I'll take a look at it.

  16. luacmartins commented on May 1, 2025

    @luacmartins
    Contributor

    I'm unable to reproduce this. Closing.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions