Skip to content

[Due for payment 2025-05-27] [$250] Expense - Tapping change workspace directs to hmm not here page #61342

Closed

Description

@lanitochka17

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.1.39-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: N/A
Email or phone of affected tester (no customers): applausetester nsquare@applause.expensifail.com
Issue reported by: Applause - Internal Team

Action Performed:

Use expensifail account

  1. Go to https://staging.new.expensify.com
  2. Create a new workspace
  3. Open workspace chat
  4. Create an expense report
  5. Click reply in Thread
  6. Tap more - Change workspace

Expected Result:

Tapping change workspace must not direct to hmm not here page

Actual Result:

Tapping change workspace directs to hmm not here page

Workaround:

Unknown

Platforms:

Select the officially supported platforms where the issue was reproduced:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop
Platforms Tested: On which of our officially supported platforms was this issue tested:
  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence
Bug6819786_1746205204196.Screenrecorder-2025-05-02-22-24-28-595.1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021919856990960117725
  • Upwork Job ID: 1919856990960117725
  • Last Price Increase: 2025-05-13
  • Automatic offers:
    • QichenZhu | Reviewer | 107305805
    • truph01 | Contributor | 107305810
Issue OwnerCurrent Issue Owner: @OfstadC

Activity

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

    @melvin-bot

    Triggered auto assignment to @OfstadC (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. samranahm commented on May 2, 2025

    @samranahm
    Contributor

    @lanitochka17 seams like the attached video is not related to this bug.
    Also I am unable to reproduce the bug based on OP.

    Screen.Recording.2025-05-02.at.10.51.05.PM.mov
  4. ChavdaSachin commented on May 2, 2025

    @ChavdaSachin
    Contributor

    Proposal

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

    Tapping change workspace directs to hmm not here page

    What is the root cause of that problem?

    We render NotFoundPage here, if report total is a falsie value here.

    if (!isMoneyRequestReport(report) || isMoneyRequestReportPendingDeletion(report) || (!report.total && !report.unheldTotal)) {

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

    We should remove the check !report.total here, allowing to change report workspace even though there's no expense yet.

    if (!isMoneyRequestReport(report) || isMoneyRequestReportPendingDeletion(report) || (!report.total && !report.unheldTotal)) {

    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)

    Also remove !report.unheldTotal check if needed (once expected behavior is super clear here.)

    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.

  5. truph01 commented on May 3, 2025

    @truph01
    Contributor

    Proposal

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

    • Tapping "Change Workspace" navigates to the "Hmm, not here" page, which is not expected behavior.

    What is the root cause of that problem?

    • The current logic at:
      if (!isMoneyRequestReport(report) || isMoneyRequestReportPendingDeletion(report) || (!report.total && !report.unheldTotal)) {

      uses the condition !report.total && !report.unheldTotal to determine whether to show the "not here" page.
    • This condition was introduced to address this issue.
    • However, if an expense scan or any other money request results in a total amount of 0, this condition incorrectly triggers the "Hmm, not here" page—even though there are valid transactions in the report.

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

    • Replace the condition !report.total && !report.unheldTotal with a check on the actual number of transactions using transactions.length === 0.
    • The transactions array can be obtained from the useReportWithTransactionsAndViolations hook:
    
    const [, transactions] = useReportWithTransactionsAndViolations(report.reportID);
    

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

    • N/A

    What alternative solutions did you explore? (Optional)

    to:

    
    if (!isMoneyRequestReport(report) || isMoneyRequestReportPendingDeletion(report)) {
    
    • With this change, the behavior would be as follows:
    1. If the report contains only a scanned expense (with a total of 0), the user is still allowed to change the workspace.
    2. If the report has no transactions at all, the user can still change the workspace.
    3. If the expense report was deleted due to the associated expense being removed (as described in issue #58459), then the report itself will also be removed. This means the bug described in that issue is no longer reproducible.

    This solution handles edge cases more gracefully while preserving expected user flows.

  6. melvin-bot commented on May 6, 2025

    @melvin-bot

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

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on May 6, 2025
  8. changed the title [-]Expense - Tapping change workspace directs to hmm not here page[/-] [+][$250] Expense - Tapping change workspace directs to hmm not here page[/+] on May 6, 2025
  9. melvin-bot commented on May 6, 2025

    @melvin-bot
  10. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on May 6, 2025
  11. melvin-bot commented on May 6, 2025

    @melvin-bot

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

  12. 24 remaining items

  13. truph01 commented on May 15, 2025

    @truph01
    Contributor

    @QichenZhu PR is ready

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on May 20, 2025
  15. changed the title [-][$250] Expense - Tapping change workspace directs to hmm not here page[/-] [+][Due for payment 2025-05-27] [$250] Expense - Tapping change workspace directs to hmm not here page[/+] on May 20, 2025
  16. melvin-bot commented on May 20, 2025

    @melvin-bot

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

  17. melvin-bot commented on May 20, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.46-12 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-05-27. 🎊

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

  18. melvin-bot commented on May 20, 2025

    @melvin-bot

    @QichenZhu @OfstadC @QichenZhu 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]

  19. QichenZhu commented on May 26, 2025

    @QichenZhu
    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/58534/files#r2107092879

    • [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.

      Link to discussion: N/A

    • [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.

    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue: https://github.com/Expensify/Expensify/issues/505035

    Regression Test Proposal

    Precondition:

    • Log in with an expensifail account

    Test:

    1. Go to ND
    2. Create two new workspaces
    3. Open any workspace chat
    4. Click the Create button in Composer and select "Create report"
    5. Right click or long press the report and select "Reply in thread"
    6. Click "More" - "Change workspace"
    7. Verify the "Hmm... it's not here" page doesn't appear

    Do we agree 👍 or 👎

  20. OfstadC commented on May 27, 2025

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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions