Skip to content

Cancel payment - IOU preview and report title display "Canceled" when canceled payment is repaid #33508

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: 1.4.16-3
Reproducible in staging?: Y
Reproducible in production?: N
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: Applause - Internal Team
Slack conversation:

Issue found when executing PR #32674

Action Performed:

  1. [User A] Request money from User B
  2. [User B] Click on IOU preview > Pay elsewhere
  3. [User B] Click 3-dot menu > Cancel payment > Cancel payment
  4. [User B] Pay elsewhere the request again

Expected Result:

IOU preview and report title will not display "Canceled" when canceled payment is repaid

Actual Result:

IOU preview and report title display "Canceled" when canceled payment is repaid

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

Bug6324145_1703263838762.bandicam_2023-12-22_17-46-22-423__1_.mp4

View all open jobs on GitHub

Activity

  1. github-actions commented on Dec 22, 2023

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  2. melvin-bot commented on Dec 22, 2023

    @melvin-bot

    Triggered auto assignment to @joelbettner (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  3. paultsimura commented on Dec 22, 2023

    @paultsimura
    Contributor

    Proposal

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

    When canceling the IOU payment and paying again, the "canceled" label remains on the report previews.

    What is the root cause of that problem?

    This is happening because when paying the IOU Request, we do not reset the iouReport.isCancelledIOU to false.

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

    First, we should fix this on FE: add an optimistic isCancelledIOU: false (and corresponding failure data) here:

    App/src/libs/actions/IOU.js

    Lines 2787 to 2797 in b0e038f

    {
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${iouReport.reportID}`,
    value: {
    ...iouReport,
    lastMessageText: optimisticIOUReportAction.message[0].text,
    lastMessageHtml: optimisticIOUReportAction.message[0].html,
    hasOutstandingChildRequest: false,
    statusNum: CONST.REPORT.STATUS.REIMBURSED,
    },
    },

    It also should be handled from the BE so that the API response will not return isCancelledIOU: true on the PayMoneyRequest call.

    What alternative solutions did you explore? (Optional)

  4. joelbettner commented on Dec 22, 2023

    @joelbettner
    Contributor

    I believe this was caused by this PR: #32674

    @Gonals would you mind taking a look. I think what @paultsimura has outlined is correct.

  5. situchan commented on Dec 22, 2023

    @situchan
    Contributor

    That PR caused lots of deploy blockers. Seems like Cancel payment feature is not complete yet.
    I'd suggest to revert PR or at least hide Cancel option until it is fully implemented without any critical bug.

  6. joelbettner commented on Dec 23, 2023

    @joelbettner
    Contributor

    I'm going to make the call that this does not need to be a deploy blocker since the fixes for this do not need to come in the App repo. The Web-Expensify and Auth PRs above should fix this.

  7. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Dec 23, 2023
  8. paultsimura commented on Dec 23, 2023

    @paultsimura
    Contributor

    @joelbettner I would say we still should add the optimistic data updates on the App side after the BE changes are done: #33508 (comment)

  9. mountiny commented on Dec 25, 2023

    @mountiny
    Contributor

    THE PR got reverted assigning @Gonals just so they are aware

  10. melvin-bot commented on Jan 18, 2024

    @melvin-bot

    This issue has not been updated in over 15 days. @joelbettner, @Gonals eroding to Monthly issue.

    P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

  11. melvin-bot commented on Mar 15, 2024

    @melvin-bot

    @joelbettner, @Gonals, this Monthly task hasn't been acted upon in 6 weeks; closing.

    If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.

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

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions