Skip to content

[Due for payment 2025-07-22] [$250] Expense - "moved this expense to personal space" in per diem expense grays out when offline #65413

Closed

Description

@jponikarchuk

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.74-9
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp https://expensify.testrail.io/index.php?/tests/view/6414951
Email or phone of affected tester (no customers): jiodnjsoijdoi@gmail.com
Issue reported by: Applause Internal Team
Device used: Mac 15.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Workspace has per diem rates.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Submit two per diem expenses to the workspace chat.
  4. Open the expense report.
  5. Click More > Delete.
  6. Delete the report.
  7. Go to self DM.
  8. Open the unreported per diem expense.
  9. Go offline.

Expected Result:

"moved this expense to your personal space" will not gray out in offline mode.

Actual Result:

"moved this expense to your personal space" grays out in offline mode.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021940923188688861275
  • Upwork Job ID: 1940923188688861275
  • Last Price Increase: 2025-07-03
  • Automatic offers:
    • thelullabyy | Contributor | 107919253
Issue OwnerCurrent Issue Owner: @NicMendonca

Activity

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

    @melvin-bot

    Triggered auto assignment to @NicMendonca (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. thelullabyy commented on Jul 3, 2025

    @thelullabyy
    Contributor

    Proposal

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

    "moved this expense to your personal space" grays out in offline mode.

    What is the root cause of that problem?

    We added the unreported action in optimistic data, but we forgot to update pendingAction as null in success data then this action is still grayed out after going offline.

    App/src/libs/actions/Report.ts

    Lines 4874 to 4878 in 9e3b5bd

    optimisticData.push({
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${childReportID}`,
    value: {[unreportedAction.reportActionID]: unreportedAction},
    });

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

    We should update pendingAction to null in success data and for failure data we can add an error message or remove this action if needed

    successData.push({
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${childReportID}`,
        value: {[unreportedAction.reportActionID]: {pendingAction: null}},
    });
    

    App/src/libs/actions/Report.ts

    Lines 4874 to 4878 in 9e3b5bd

    optimisticData.push({
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${childReportID}`,
    value: {[unreportedAction.reportActionID]: unreportedAction},
    });

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

    Update deleteAppReport test to verify the pending action of unreported action is updated after the API is success.

    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 Jul 3, 2025
  5. changed the title [-]Expense - "moved this expense to personal space" in per diem expense grays out when offline[/-] [+][$250] Expense - "moved this expense to personal space" in per diem expense grays out when offline[/+] on Jul 3, 2025
  6. melvin-bot commented on Jul 3, 2025

    @melvin-bot
  7. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 3, 2025
  8. melvin-bot commented on Jul 3, 2025

    @melvin-bot

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

  9. s77rt commented on Jul 4, 2025

    @s77rt
    Member

    @thelullabyy Thanks for the proposal. Your RCA and solution look good to me.

    🎀 👀 🎀 C+ reviewed
    Link to proposal

  10. melvin-bot commented on Jul 4, 2025

    @melvin-bot

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

  11. 6 remaining items

  12. changed the title [-][$250] Expense - "moved this expense to personal space" in per diem expense grays out when offline[/-] [+][Due for payment 2025-07-22] [$250] Expense - "moved this expense to personal space" in per diem expense grays out when offline[/+] on Jul 15, 2025
  13. melvin-bot commented on Jul 15, 2025

    @melvin-bot

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

  14. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.80-8 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-07-22. 🎊

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

  15. melvin-bot commented on Jul 15, 2025

    @melvin-bot

    @s77rt @NicMendonca 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]

  16. s77rt commented on Jul 21, 2025

    @s77rt
    Member

    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: [Simplified Actions] Implement DeleteAppReport  #58020 (comment)

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

      Bug requires regression test: Yes

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

      Link to issue:

    Regression Test Proposal

    Precondition:

    • Workspace with per diem rates

    Test:

    1. Open workspace chat
    2. Submit 2 per diem expenses
    3. Open the expense report and delete it
    4. Go to self DM
    5. Verify you see the previously submitted expenses (they are now moved to self DM)
    6. Open one of the two expenses
    7. Verify "moved this expense to your personal space" message is displayed
    8. Go offline
    9. Verify "moved this expense to your personal space" is not grayed out

    Do we agree 👍 or 👎

  17. NicMendonca commented on Jul 22, 2025

    @NicMendonca
    Contributor

    Payment summary

    C+: @s77rt paid $250 via NewDot
    Contributor: @thelullabyy paid $250 via Upwork (done ✅ )

  18. JmillsExpensify commented on Jul 25, 2025

    @JmillsExpensify
    Contributor

    $250 approved for @s77rt

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