Skip to content

[Awaiting Checklist] [Due for payment 2025-11-13] [$250] Page not here when user expand these section amount/ description/ categories and date #73516

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: v9.2.38-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/13176687/test-cases/41236712
Email or phone of affected tester (no customers): na
Issue reported by: Applause Internal Team
Device used: IOS
App Component: User Settings

Action Performed:

Preconditions: Use only expensifail account and don't use gmail account
4 accounts are needed for this TC:

  • Account A: Workspace owner (should invite following accounts)
  • Account B: Workspace approver (Should set an Account C as Vacation delegate)
  • Account C: Vacation delegate
  • Account D: Workspace submitter

***User D submitted an IOU to Workspace

  1. Launch the IOS hybrid app
  2. Log in as Account C (vacation delegate)
  3. Go to the IOU that needs to be approved by Account B
  4. Tap on the IOU details
  5. Tap on any expand arrow (amount, description, date, category)

Expected Result:

Users should not be directed to Not here page, instead users should be directed to related page

Actual Result:

When users tap on the expand arrow under these section amount/ category/ description/ date, users directed to not here page

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/~021982874522745659384
  • Upwork Job ID: 1982874522745659384
  • Last Price Increase: 2025-10-27
Issue OwnerCurrent Issue Owner: @garrettmknight

Activity

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

    @melvin-bot

    Triggered auto assignment to @garrettmknight (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. bernhardoj commented on Oct 27, 2025

    @bernhardoj
    Contributor

    Proposal

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

    Not found page when opening the money request field as vacation delegate.

    This issue doesn't need a vacation delegate actually, just an approver (not an admin, not a submitter) will be able to reproduce it.

    What is the root cause of that problem?

    We check canEditMoneyRequest whether to show the not found page or not.

    shouldShowNotFoundPage = !isMoneyRequestAction(reportAction) || !canEditMoneyRequest(reportAction, false, report, policy, transaction);

    If the user is the manager, then it will return true, which should happen.

    App/src/libs/ReportUtils.ts

    Lines 4370 to 4379 in 2b89b1c

    const isManager = currentUserAccountID === moneyRequestReport?.managerID;
    if (isInvoiceReport(moneyRequestReport) && (isManager || isChatReportArchived)) {
    return false;
    }
    // Admin & managers can always edit coding fields such as tag, category, billable, etc.
    if (isAdmin || isManager) {
    return true;
    }

    But, the moneyRequestReport?.managerID is 0. It's because the report passed to the function is the transaction thread report, and its managerID is 0, but the function expects the report to be an IOU/expense report. We pass the report to the function based on the reportID on the edit field page reportID params, and it's always a transcation thread reportID.

    const shouldShowNotFoundPage = useShowNotFoundPageInIOUStep(action, iouType, reportActionID, report, transaction);

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

    We can get the iouReport inside the hook.

    (we can default it to undefined for split bill since it doesn't have iou report)

    // or from `report.parentReportID`
    const [iouReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${transaction?.reportID}`, {canBeMissing: true});
    

    Then pass this to the canEditMoneyRequest instead of report.

    shouldShowNotFoundPage = !isMoneyRequestAction(reportAction) || !canEditMoneyRequest(reportAction, false, report, policy, transaction);

  4. lorretheboy commented on Oct 27, 2025

    @lorretheboy
    Contributor

    Proposal

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

    When users tap on the expand arrow under these section amount/ category/ description/ date, users directed to not here page

    What is the root cause of that problem?

    The canEditMoneyRequest function was checking permissions against the transaction thread report (which has managerID = 0) instead of the actual IOU/expense report. This caused the function to incorrectly determine that the current user (vacation delegate) was not a manager, even though they had permission to approve the expense.

    const moneyRequestReport = getReportOrDraftReport(String(moneyRequestReportID));

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

    If the report parameter is a transaction thread (which has managerID = 0), we should get the actual IOU/expense report from the IOUReportID instead. Transaction threads don't have manager information, so we need the parent IOU report

        const moneyRequestReport = isThread(report) ? getReportOrDraftReport(String(moneyRequestReportID)) : (report ?? getReportOrDraftReport(String(moneyRequestReportID)));

    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.

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 27, 2025
  6. changed the title [-]Page not here when user expand these section amount/ description/ categories and date[/-] [+][$250] Page not here when user expand these section amount/ description/ categories and date[/+] on Oct 27, 2025
  7. melvin-bot commented on Oct 27, 2025

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

    @melvin-bot

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

  10. dukenv0307 commented on Oct 30, 2025

    @dukenv0307
    Contributor

    @lorretheboy I think you mentioned the outdated version of canEditMoneyRequest. It was changed to accept a report, so we should pass the correct iou one.

    @bernhardoj's proposal looks good to me

    🎀👀🎀 C+ reviewed

  11. melvin-bot commented on Oct 30, 2025

    @melvin-bot

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

  12. 19 remaining items

  13. mallenexpensify commented on Nov 14, 2025

    @mallenexpensify
    Contributor

    Payment Summary

    Contributor: @bernhardoj due $250 via NewDot
    Contributor+: @dukenv0307 due $250 via NewDot

    @dukenv0307 plz complete the BZ checklist.

  14. bernhardoj commented on Nov 15, 2025

    @bernhardoj
    Contributor

    Requested in ND.

  15. changed the title [-][Due for payment 2025-11-13] [$250] Page not here when user expand these section amount/ description/ categories and date[/-] [+][Awaiting Checklist] [Due for payment 2025-11-13] [$250] Page not here when user expand these section amount/ description/ categories and date[/+] on Nov 17, 2025
  16. garrettmknight commented on Nov 17, 2025

    @garrettmknight
    Contributor

    @dukenv0307 checklist please!

  17. dukenv0307 commented on Nov 19, 2025

    @dukenv0307
    Contributor

    BugZero Checklist:

    • [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/72366/files#r2542410580

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

    Regression Test Proposal Template
    • [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:

    • User A has a WS, invites User B as a normal member, sets User B as an approver, and then submits an expense in WS chat

    Test:

    As User B

    Open the expense
    Press any of the money request fields (amount, description, etc.)
    Verify you can edit it

    Do we agree 👍 or 👎

  18. dukenv0307 commented on Nov 19, 2025

    @dukenv0307
    Contributor

    @garrettmknight I completed the checklist. Thank you

  19. garrettmknight commented on Nov 21, 2025

    @garrettmknight
    Contributor

    $250 approved for @bernhardoj

  20. quinthar commented on Dec 19, 2025

    @quinthar
    Contributor

    Approved $250 to @dukenv0307

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