Skip to content

[$125] Report - Word "You" missing on next step on expense created offline with instant submission #74919

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.2.49-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/test-runs/TR-1935/41236925/1008201663?q=instant&issue_type=jira
Email or phone of affected tester (no customers): ibellicotest+2049@gmail.com
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 / Android 12 / Chrome ( mWeb / Hybrid app) - Windows 11 / Chrome
App Component: Money Requests

Action Performed:

Prerequisite: Account has at least one workspace.
Prerequisite 2: Submission frequency set to "Instantly"

  1. Open the Expensify app.
  2. Open any workspace chat.
  3. Turn off internet connection.
  4. Create a manual expense.
  5. Open the report of the just created expense.
  6. Note that next step message displays "Waiting for to approve expense" without "You"

Expected Result:

When creating an expense on a workspace with submission frequency set to "Instantly", next step message should be "Waiting for you to approve expense".

Actual Result:

After creating a manual expense while offline on a workspace with submissions frequency set to "Instantly", next step message is displayed as "Waiting for to approve expense" without the word "You".

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/~021988750606339448220
  • Upwork Job ID: 1988750606339448220
  • Last Price Increase: 2026-03-24
Issue OwnerCurrent Issue Owner: @parasharrajat

Activity

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

    @melvin-bot

    Triggered auto assignment to @mallenexpensify (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. etCoderDysto commented on Nov 12, 2025

    @etCoderDysto
    Contributor

    Proposal

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

    Report - Word "You" missing on next step on expense created offline with instant submission

    What is the root cause of that problem?

    We call getNextApproverDisplayName to get the next approver display name. And we call getNextApproverAccountID to get approvers accountID.

    const nextApproverDisplayName = getNextApproverDisplayName(report, isUnapprove);

    In getNextApproverAccountID, we assign the first approver in the approval chain if the current user is not in the approval chain. But in this case, the approver is the submitter and and the only approver on the approver chain. Therefore currentUserIndex is 0. And nextapproveremail will be undefined when we are trying to access approvalChain[1] while approvalChain have only one item

    App/src/libs/ReportUtils.ts

    Lines 4481 to 4482 in 82a45ab

    const currentUserIndex = approvalChain.indexOf(currentUserEmail ?? '');
    const nextApproverEmail = currentUserIndex === -1 ? approvalChain.at(0) : approvalChain.at(currentUserIndex + 1);

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

    We should return the only approver as the next nextApproverEmail if the report is not approved yet

    const hasOnlyApproverApproved = approvalChain.length === 1 && isReportApproved({report});
    const nextApproverEmail = currentUserIndex === -1 || !hasOnlyApproverApproved ? approvalChain.at(0) : approvalChain.at(currentUserIndex + 1);

    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. nkdengineer commented on Nov 12, 2025

    @nkdengineer
    Contributor

    Proposal

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

    After creating a manual expense while offline on a workspace with submissions frequency set to "Instantly", next step message is displayed as "Waiting for to approve expense" without the word "You".

    What is the root cause of that problem?

    When the last approver is the current user, we ignore this here

    App/src/libs/ReportUtils.ts

    Lines 4482 to 4488 in 82a45ab

    const nextApproverEmail = currentUserIndex === -1 ? approvalChain.at(0) : approvalChain.at(currentUserIndex + 1);
    if (!nextApproverEmail) {
    // If there's no next approver in the chain, return undefined to indicate the current user is the final approver
    return undefined;
    }

    Which cause nextApproverDisplayName, approverAccountID are empty then the You word is missing

    const nextApproverDisplayName = getNextApproverDisplayName(report, isUnapprove);
    const approverAccountID = getNextApproverAccountID(report, isUnapprove);

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

    Define shouldIgnoreCurrentUser param in getNextApproverAccountID and getNextApproverDisplayName.

    Update this condition here to

    const nextApproverEmail = currentUserIndex === -1 || !shouldIgnoreCurrentUser ? approvalChain.at(0) : approvalChain.at(currentUserIndex + 1);
    

    App/src/libs/ReportUtils.ts

    Lines 4482 to 4488 in 82a45ab

    const nextApproverEmail = currentUserIndex === -1 ? approvalChain.at(0) : approvalChain.at(currentUserIndex + 1);
    if (!nextApproverEmail) {
    // If there's no next approver in the chain, return undefined to indicate the current user is the final approver
    return undefined;
    }

    Then pass it as false here

    const nextApproverDisplayName = getNextApproverDisplayName(report, isUnapprove, false);
        const approverAccountID = getNextApproverAccountID(report, isUnapprove, false);
    

    const nextApproverDisplayName = getNextApproverDisplayName(report, isUnapprove);
    const approverAccountID = getNextApproverAccountID(report, isUnapprove);

    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. changed the title [-]Report - Word "You" missing on next step on expense created offline with instant submission[/-] [+][$125] Report - Word "You" missing on next step on expense created offline with instant submission[/+] on Nov 12, 2025
  6. melvin-bot commented on Nov 12, 2025

    @melvin-bot

    ⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

  7. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 12, 2025
  8. melvin-bot commented on Nov 12, 2025

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

    @melvin-bot

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

  11. mallenexpensify commented on Nov 12, 2025

    @mallenexpensify
    Contributor

    Think/hope this is a quick fix. Was able to reproduce

    Image
  12. melvin-bot commented on Nov 19, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  13. 58 remaining items

  14. melvin-bot commented on Mar 16, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  15. parasharrajat commented on Mar 16, 2026

    @parasharrajat
    Member

    Rechecking this tomorrow.

  16. added a commit that references this issue on Mar 19, 2026
    f9c27f8
  17. wildan-m commented on Mar 19, 2026

    @wildan-m
    Contributor

    🚫 Duplicated proposal withdrawn by 🤖 ProposalPolice.

  18. github-actions commented on Mar 19, 2026

    @github-actions
    Contributor

    ⚠️ @wildan-m Your proposal is a duplicate of an already existing proposal and has been automatically withdrawn to prevent spam. Please review the existing proposals before submitting a new one.

  19. mvtglobally commented on Mar 21, 2026

    @mvtglobally

    Issue not reproducible during KI retests. (Second week)

  20. melvin-bot commented on Mar 24, 2026

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  21. melvin-bot commented on Mar 24, 2026

    @melvin-bot

    @parasharrajat Huh... This is 4 days overdue. Who can take care of this?

  22. mallenexpensify commented on Mar 24, 2026

    @mallenexpensify
    Contributor

    Closing as not reproducible.

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions