Skip to content

[Awaiting Payment Sept 10th] [$250] [Held requests] Hold badge remains on paid expense until refresh the page #44616

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.0.3-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4678849&group_by=cases:section_id&group_order=asc&group_id=309128
Email or phone of affected tester (no customers): gocemate+a445@gmail.com
Issue reported by: Applause - Internal Team

Action Performed:

  1. User A creates expense with User B
  2. User B navigates to transaction thread and select Hold from 3-dot menu
  3. User B pays the expense elsewhere
  4. Take a note of Hold badge on the chat header on both User A and User B

Expected Result:

Since the expense is payed hold status should not be displayed anymore

Actual Result:

Hold status remains displayed even expense is payed

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6527187_1719565919023.Recording__3361.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0197333211c4d3993e
  • Upwork Job ID: 1821527955232770128
  • Last Price Increase: 2024-08-30
Issue OwnerCurrent Issue Owner: @

Activity

  1. added
    Daily
    Bug
    on Jun 28, 2024
  2. melvin-bot commented on Jun 28, 2024

    @melvin-bot

    Triggered auto assignment to @trjExpensify (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. lanitochka17 commented on Jun 28, 2024

    @lanitochka17
    Author

    @trjExpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. bernhardoj commented on Jun 28, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The hold banner doesn't disappear until we refresh the page for a paid expense.

    What is the root cause of that problem?

    When we pay the expense, we don't optimistically clear the hold status of the report. The pusher or API response doesn't clear the hold status either until we reload the page (from OpenReport).

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

    BE: clears the hold status from the API response and/or pusher.
    FE: Optimistically clear the hold status
    In IOU.getPayMoneyRequestParams, add below optimistic data:

    ...(full ? TransactionUtils.getAllReportTransactions(iouReport.reportID).map((transaction) => ({
        onyxMethod: Onyx.METHOD.MERGE,
        key: `${ONYXKEYS.COLLECTION.TRANSACTION}${transaction.transactionID}`,
        value: {
            comment: {
                hold: null,
            },
        }
    })) : []),
    

    (and revert it back in failureData)

    What the code above does is, get all the expense report transactions and clear the hold status. We only do this if the full is true which means we pay all hold and non-hold requests.

  5. trjExpensify commented on Jun 28, 2024

    @trjExpensify
    Contributor

    I have a feeling @robertjchen is working on fixing this already. Maybe he can confirm.

    Bit of a sidebar, but for the whack copy and stuff, you're talking care of that here: #42736

  6. robertjchen commented on Jul 1, 2024

    @robertjchen
    Contributor

    Yes! This should be addressed with the optimistic changes in: #42573

    We can put this on hold until those changes are out and then re-test after to make sure this is fixed 👍

  7. changed the title [-]Hold - Hold badge remains on paid expense until refresh the page[/-] [+][Hold #42573] [Held requests] Hold badge remains on paid expense until refresh the page[/+] on Jul 1, 2024
  8. trjExpensify commented on Jul 1, 2024

    @trjExpensify
    Contributor

    Cool, done!

  9. 68 remaining items

  10. added
    Awaiting Payment
    Reviewing
    and removed
    Reviewing
    Awaiting Payment
    on Aug 30, 2024
  11. changed the title [-][$250] [Held requests] Hold badge remains on paid expense until refresh the page[/-] [+][Awaiting Payment Sept 10th] [$250] [Held requests] Hold badge remains on paid expense until refresh the page[/+] on Sep 10, 2024
  12. added
    Daily
    Awaiting Payment
    and removed
    Reviewing
    Weekly
    on Sep 10, 2024
  13. trjExpensify commented on Sep 10, 2024

    @trjExpensify
    Contributor

    Payments are due here today. Payment summary as follows:

    Both of you can go ahead and request on NewDot, closing!

  14. bernhardoj commented on Sep 11, 2024

    @bernhardoj
    Contributor

    Requested in ND.

  15. JmillsExpensify commented on Sep 11, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

  16. garrettmknight commented on Sep 13, 2024

    @garrettmknight
    Contributor

    $250 approved for @getusha

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

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternal

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions