Skip to content

[HIGH] Hold doesn't show in three dot menu until report is opened #52401

Closed

Description

@m-natarajan

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.0.60-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @garrettmknight
Slack conversation (hyperlinked to channel name): ts_external_expensify_expense

Action Performed:

  1. Create a workspace
  2. Invite Submitter + Approver A
  3. Enable Workflows > Approval + Delay Submission
  4. Set Approver A as approver
  5. As Submitter, create expense in WS chat + submit
  6. Tag the approver in the workspace chat and invite them
  7. As Approver A, navigate to Submitter's WS chat + click the three dot menu on the expense

Expected Result:

Since this is a one expense report, you should see Hold in the three dot menu for the report

Actual Result:

The Hold action is not available in the menu until you open the expense and go back

Workaround:

You don't see Hold until you access the expense/report and back out into the WS chat again.

Platforms:

Which of our officially supported platforms is this issue occurring on?

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

Screenshots/Videos

Add any screenshot/video evidence
HoldMenu2024-12-12_15-59-35.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021857521697236720139
  • Upwork Job ID: 1857521697236720139
  • Last Price Increase: 2024-11-22
Issue OwnerCurrent Issue Owner: @neil-marcellini

Activity

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

    @melvin-bot

    Triggered auto assignment to @CortneyOfstad (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. CortneyOfstad commented on Nov 15, 2024

    @CortneyOfstad
    Contributor

    I was able to recreate this under my expensifail.com account, so getting some eyes on this!

  4. changed the title [-]Hold doesn't show in three dot menu until report is opened[/-] [+][$250] Hold doesn't show in three dot menu until report is opened[/+] on Nov 15, 2024
  5. melvin-bot commented on Nov 15, 2024

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 15, 2024
  7. melvin-bot commented on Nov 15, 2024

    @melvin-bot

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

  8. 143 remaining items

  9. changed the title [-][CRITICAL] Hold doesn't show in three dot menu until report is opened[/-] [+][HIGH] Hold doesn't show in three dot menu until report is opened[/+] on May 14, 2025
  10. CortneyOfstad commented on May 20, 2025

    @CortneyOfstad
    Contributor

    Hey @iwiznia — checking to see if there is an update? Thanks!

  11. iwiznia commented on May 23, 2025

    @iwiznia
    Contributor

    Alright, I looked into this again. I think the main issue here is that we are never loading from the server the reportActions of the expense report that we are getting from onyx here, so it does not find it here, so moneyRequestAction here is undefined and we pass it here so in this shouldShow method we return false.

    I don't think we can load all reportActions of all expense reports in the workspace chat, so unsure about what the solution should be 🤔

  12. iwiznia commented on May 23, 2025

    @iwiznia
    Contributor

    The only thing I can think of is to move all the logic to the backend and return something like canHold: bool, canUnhold: bool directly from the server as part of the expense report's data OR as part of the reportActions's data.

  13. iwiznia commented on May 23, 2025

    @iwiznia
    Contributor

    Or maybe even return a allowedActions property with a list of actions that are allowed and basically replace all the shouldShow methods of ContextMenuActions.tsx with the data coming from the server.
    It of course is more work, but:

    1. It might prevent other bugs similar to this one, since it seems a lot of those assume data is loaded and it might not be the case.
    2. We should have the same logic in the backend too (even if that's not the case now), since backend should be rejecting any invalid action anyway (like trying to hold an expense that can't be held), so we would be deduplicating logic
  14. iwiznia commented on May 23, 2025

    @iwiznia
    Contributor

    Conversation about the proposal above here https://expensify.slack.com/archives/C03TQ48KC/p1748001911447839

  15. CortneyOfstad commented on May 23, 2025

    @CortneyOfstad
    Contributor

    Thanks @iwiznia!

  16. CortneyOfstad commented on May 30, 2025

    @CortneyOfstad
    Contributor

    Update: PR is actively moving — found some conflicts and Viktoryia found a bug during the retesting. Most recent comment is here with Vik asking @iwiznia for a review 👍

  17. CortneyOfstad commented on Jun 3, 2025

    @CortneyOfstad
    Contributor

    PR has been merged, but has not deployed to staging yet.

    @iwiznia — just a heads up that I am heading OoO this afternoon (6/3) to Monday (6/9) so if any action is needed from a BZ perspective, please reapply the label. Otherwise I will get it addressed as soon as I am back. Thanks!

  18. CortneyOfstad commented on Jun 9, 2025

    @CortneyOfstad
    Contributor

    I'm back! PR was deployed to staging 4 days ago, so will keep an eye out for when it is in production 👍

  19. CortneyOfstad commented on Jun 13, 2025

    @CortneyOfstad
    Contributor

    PR was merged and issue is resolved (unable to recreate) — closing this out!

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

Metadata

Metadata

Labels

AutoAssignerNewDotQualityUsed to assign quality issues to engineersBugSomething is broken. Auto assigns a BugZero manager.EngineeringImprovementItem broken or needs improvement.InternalRequires API changes or must be handled by Expensify staffWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions