Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2024-01-26] [HOLD for payment 2024-01-25] Cancel payment - IOU is still marked as paid when payment is canceled unless report is revisited #33509

Closed
4 of 6 tasks
lanitochka17 opened this issue Dec 22, 2023 · 12 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Monthly KSv2 Not a priority

Comments

@lanitochka17
Copy link

lanitochka17 commented Dec 22, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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

Expected Result:

On User A's end, the IOU preview will no longer be marked as paid when the payment is cancelled

Actual Result:

On User A's end, the IOU preview is still marked as paid unless the IOU report is revisited

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

Bug6324149_1703264039124.bandicam_2023-12-22_17-31-55-857__1_.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added the DeployBlockerCash This issue or pull request should block deployment label Dec 22, 2023
Copy link
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.

Copy link

melvin-bot bot commented Dec 22, 2023

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

@paultsimura
Copy link
Contributor

paultsimura commented Dec 22, 2023

Proposal

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

When canceling the payment, its status is not immediately changed to "canceled".

What is the root cause of that problem?

This is a combined BE and FE issue. This is also seen on the Admin's side: the "canceled" label is not added at all.
We do not update the iouReport.isCancelledIOU: true optimistically when canceling the payment.

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

When canceling the payment, we should optimistically set isCancelledIOU: true here. This will make the changes immediate for the Admin and ensure the Offline-first approach:

App/src/libs/actions/IOU.js

Lines 3114 to 3123 in b0e038f

onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.REPORT}${expenseReport.reportID}`,
value: {
...expenseReport,
lastMessageText: lodashGet(optimisticReportAction, 'message.0.text', ''),
lastMessageHtml: lodashGet(optimisticReportAction, 'message.0.html', ''),
state: isFree ? CONST.REPORT.STATE.SUBMITTED : CONST.REPORT.STATE.OPEN,
stateNum: isFree ? CONST.REPORT.STATE_NUM.PROCESSING : CONST.REPORT.STATE.OPEN,
statusNum: isFree ? CONST.REPORT.STATUS.SUBMITTED : CONST.REPORT.STATE.OPEN,
},

Also, we should update the BE: Pusher should update the IOU Report on the member side when it's marked as isCancelledIOU: true via the CancelPayment API call.

What alternative solutions did you explore? (Optional)

@mountiny
Copy link
Contributor

Reverting the original PR because it has caused numerous deploy blockers and the author is ooo

@mountiny mountiny removed Reviewing Has a PR in review DeployBlockerCash This issue or pull request should block deployment labels Dec 25, 2023
@mountiny mountiny assigned Gonals and unassigned johnmlee101 Dec 25, 2023
@mountiny
Copy link
Contributor

PR reverted, Assigning @Gonals so you can track this issue and fix it in next iteration

@Gonals Gonals added Monthly KSv2 and removed Weekly KSv2 labels Dec 27, 2023
@Gonals
Copy link
Contributor

Gonals commented Dec 27, 2023

Setting it as monthly, as this is no longer happening (but I want it to keep track)

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Monthly KSv2 labels Jan 2, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 15, 2024
Copy link

melvin-bot bot commented Jan 17, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 18, 2024
@melvin-bot melvin-bot bot changed the title Cancel payment - IOU is still marked as paid when payment is canceled unless report is revisited [HOLD for payment 2024-01-25] Cancel payment - IOU is still marked as paid when payment is canceled unless report is revisited Jan 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 18, 2024
Copy link

melvin-bot bot commented Jan 18, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Jan 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.26-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-01-25. 🎊

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Jan 19, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-01-25] Cancel payment - IOU is still marked as paid when payment is canceled unless report is revisited [HOLD for payment 2024-01-26] [HOLD for payment 2024-01-25] Cancel payment - IOU is still marked as paid when payment is canceled unless report is revisited Jan 19, 2024
Copy link

melvin-bot bot commented Jan 19, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.27-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-01-26. 🎊

@melvin-bot melvin-bot bot added the Overdue label Jan 29, 2024
@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Feb 12, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

This issue has not been updated in over 15 days. @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!

@melvin-bot melvin-bot bot removed the Overdue label Feb 12, 2024
@melvin-bot melvin-bot bot added the Overdue label Mar 14, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

@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.

@melvin-bot melvin-bot bot closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering Monthly KSv2 Not a priority
Projects
None yet
Development

No branches or pull requests

5 participants