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-12-19] [$250] IOU – Not here page when create new request after canceling payment for the first one #49801

Open
1 of 6 tasks
lanitochka17 opened this issue Sep 26, 2024 · 42 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Overdue

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 26, 2024

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: 9.0.40-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to workspace chat> + > Submit expense> Complete the flow
  2. Pay the request
  3. Go to transaction thread> Click on header> Cancel payment
  4. Go to main page> + > Submit expense> Complete the flow
  5. Navigate to newly created request

Expected Result:

Transaction thread should open

Actual Result:

Not here page appears

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

Bug6615745_1727335874664.Recording__4134.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021840688856056706978
  • Upwork Job ID: 1840688856056706978
  • Last Price Increase: 2024-09-30
  • Automatic offers:
    • nkdengineer | Contributor | 104431780
Issue OwnerCurrent Issue Owner: @sonialiap
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 26, 2024
Copy link

melvin-bot bot commented Sep 26, 2024

Triggered auto assignment to @sonialiap (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.

@lanitochka17
Copy link
Author

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

@nkdengineer
Copy link
Contributor

Proposal

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

Not here page appears

What is the root cause of that problem?

  • When we pay money requests, the iouReportID of the chat report is updated to null. But it's not updated to the expense report again when we cancel the payment.

  • Then when we submitted another request, we created a new optimistic report preview action and a new expense report but the backend moved this to the canceled payment expense report. So not found page appears when we open the expense report from the optimistic report preview action.

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

When we cancel payment here, we should update iouReportID in optimistic data here if chatReport.iouReportID is null or we can check if the current chatReport.iouReportID is created before or after the expenseReport to decide update iouReportID or not.

{
    onyxMethod: Onyx.METHOD.MERGE,
    key: `${ONYXKEYS.COLLECTION.REPORT}${chatReport.reportID}`,
    value: {
        iouReportID: chatReport?.iouReportID ? chatReport?.iouReportID : expenseReport.reportID,
    },
}

const optimisticData: OnyxUpdate[] = [

We also need a BE change to update iouReportID of the chat report when we cancel the payment because

  • iouReportID isn't updated after we cancel the payment
  • If we submit another expense after canceling payment, BE still moves this to the canceled expense report

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Sep 30, 2024
@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Sep 30, 2024
@melvin-bot melvin-bot bot changed the title IOU – Not here page when create new request after canceling payment for the first one [$250] IOU – Not here page when create new request after canceling payment for the first one Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021840688856056706978

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 30, 2024
Copy link

melvin-bot bot commented Sep 30, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Sep 30, 2024
@rushatgabhane
Copy link
Member

that makes sense to me. 🎀 👀 🎀

#49801 (comment)

Copy link

melvin-bot bot commented Oct 1, 2024

Triggered auto assignment to @tgolen, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@rushatgabhane
Copy link
Member

rushatgabhane commented Oct 1, 2024

the iouReportID of the chat report is updated to null. But it's not updated to the expense report again when we cancel the payment.

@nkdengineer how will we know the old iouReportID that we need to optimistically reset to after cancellling payment?

iouReportID: chatReport?.iouReportID ? chatReport?.iouReportID : expenseReport.reportID

i mean what is chatReport here?

what will happen when a report has multiple expenses and we cancel only one of them?

@nkdengineer
Copy link
Contributor

@nkdengineer how will we know the old iouReportID that we need to optimistically reset to after cancellling payment?

@rushatgabhane When we create a money request in the chatReport (DM or policy expense chat), we get the IOU report via chatReport.iouReportID. So we need to update iouReportID of the chatReport.

App/src/libs/actions/IOU.ts

Lines 2053 to 2056 in 69483ff

} else {
iouReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${chatReport.iouReportID}`] ?? null;
}

what will happen when a report has multiple expenses and we cancel only one of them?

We can check if the current iouReportID of the chatReport is created before the cancelling iou report or iouReportID we need to update iouReportID to the cancelling iou report otherwise we can keep the current chatReport.iouReportID

Copy link

melvin-bot bot commented Oct 4, 2024

@tgolen, @sonialiap, @rushatgabhane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 8, 2024

@tgolen, @sonialiap, @rushatgabhane Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Oct 10, 2024

@tgolen @sonialiap @rushatgabhane this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Oct 10, 2024

@tgolen, @sonialiap, @rushatgabhane 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@sonialiap
Copy link
Contributor

@rushatgabhane bumping, Duy left a comment, do we need to make changes to the PR?

@nkdengineer
Copy link
Contributor

@tgolen Can you review the comment here?

@tgolen
Copy link
Contributor

tgolen commented Oct 11, 2024

Hm, yeah... sorry. I remember seeing that, and I was expecting @rushatgabhane to respond to that before I assigned anything. I've looked at the comment, and the answer seems to make sense to me, but I am not very familiar with the code or the flow. @nkdengineer do you think that's just something we can tackle in the PR? If so, I'll go ahead and assign you.

Copy link

melvin-bot bot commented Oct 14, 2024

@tgolen, @sonialiap, @rushatgabhane 12 days overdue now... This issue's end is nigh!

@tgolen
Copy link
Contributor

tgolen commented Oct 25, 2024

OK, got it. I'll create an issue for that and I can let you know when it's deployed if you'd like.

@nkdengineer
Copy link
Contributor

Thanks.

@tgolen
Copy link
Contributor

tgolen commented Oct 25, 2024

I just submitted a PR for it, so it should get merged and deployed early next week. I'll let you know when it does.

@sonialiap
Copy link
Contributor

"Include the iouReportID of the chat report in the CancelPayment response" deployed to production 19 hours ago

@tgolen
Copy link
Contributor

tgolen commented Nov 8, 2024

Yes, the backend things are completed on this. What's the next step for this issue?

@nkdengineer
Copy link
Contributor

Waiting update from @rushatgabhane.

@rushatgabhane
Copy link
Member

posted here - #50847 (comment)

Copy link

melvin-bot bot commented Dec 5, 2024

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

@sonialiap
Copy link
Contributor

Update - PR in process #50847

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Dec 12, 2024
@melvin-bot melvin-bot bot changed the title [$250] IOU – Not here page when create new request after canceling payment for the first one [HOLD for payment 2024-12-19] [$250] IOU – Not here page when create new request after canceling payment for the first one Dec 12, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

Copy link

melvin-bot bot commented Dec 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.74-8 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-12-19. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Dec 12, 2024

@rushatgabhane @sonialiap @rushatgabhane The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@sonialiap sonialiap removed their assignment Dec 13, 2024
@sonialiap sonialiap added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Dec 13, 2024
Copy link

melvin-bot bot commented Dec 13, 2024

Triggered auto assignment to @bfitzexpensify (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.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 13, 2024
@sonialiap
Copy link
Contributor

I'm OOO Dec 16-20, adding a leave buddy

next steps:

@sonialiap sonialiap self-assigned this Dec 13, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 16, 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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Overdue
Projects
None yet
Development

No branches or pull requests

6 participants