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

[Held requests] When partial approving report, long delay creating new report for held expense(s) #41652

Closed
6 tasks done
m-natarajan opened this issue May 5, 2024 · 54 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented May 5, 2024

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.70-2
Reproducible in staging?: Yes
Reproducible in production?: Yes
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: @JmillsExpensify
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1714761240737509

Action Performed:

  1. Navigate to a report containing several expenses from someone else
  2. Click in the three dot menu in the expense
  3. Choose Hold, leave comment
  4. Confirm that the expense is on hold (e.g. Hold in the header)
  5. Navigate to the report, click Approve
  6. Choose Approve only…

Expected Result:

A new report with the held expense is created immediately in the front-end

Actual Result:

A new report with the held expense is created 10+ seconds later

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

partial.approving.mp4

Add any screenshot/video evidence

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @kevinksullivan
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 5, 2024
Copy link

melvin-bot bot commented May 5, 2024

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

@JmillsExpensify
Copy link

JmillsExpensify commented May 6, 2024

After speaking internally, we landed on the following solution:

  • Optimistically create the report
  • Use the "pending" pattern as long as the user is offline
  • Set the report total/currency optimistically to the first expense on the report
  • Message in subsequent expense previews to correctly reflect that the report total will be updated when the user comes online
  • Update X expenses on the report preview to correctly reflect the number of expenses on the report

We already employ this solution for IOU reports but we need to update expense reports to bring them in line and do the same thing.

@JmillsExpensify
Copy link

Screenshots for clarity

Report created optimistically with multiple currencies
CleanShot 2024-05-06 at 06 32 31@2x

Report preview appropriately showing 2 expenses
CleanShot 2024-05-06 at 06 31 47@2x

@JmillsExpensify
Copy link

Based on a Slack convo, I think that @war-in might be interested in this issue?

@nkdengineer
Copy link
Contributor

@JmillsExpensify This bug is the same as #39338. I think we should re-open the original issue.

@war-in
Copy link
Contributor

war-in commented May 7, 2024

Based on a Slack convo, I think that @war-in might be interested in this issue?

Yes, I would like to take this one

@trjExpensify trjExpensify changed the title When partial approving report, long delay creating new report for held expense(s) [Held requests] When partial approving report, long delay creating new report for held expense(s) May 8, 2024
@trjExpensify
Copy link
Contributor

@war-in are you good to prioritise putting up a PR for this one?

@trjExpensify
Copy link
Contributor

@nkdengineer @robertjchen I'm going to assign you both to ultimately review the PR. 👍

@war-in
Copy link
Contributor

war-in commented May 8, 2024

Yes, however, I work part-time and will be available on Friday. Is that okay with you?

@melvin-bot melvin-bot bot added the Overdue label May 10, 2024
Copy link

melvin-bot bot commented May 13, 2024

@robertjchen, @kevinksullivan, @war-in, @nkdengineer Eep! 4 days overdue now. Issues have feelings too...

@robertjchen
Copy link
Contributor

In progress/Discussions on Slack

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels May 14, 2024
@war-in
Copy link
Contributor

war-in commented May 17, 2024

Hi @robertjchen 👋
Contacting you there because I was removed from the #expensify-bugs channel 😢
My current progress looks like that

Screen.Recording.2024-05-17.at.16.33.25.mov

It's not finished yet but would be nice to get an endpoint which accepts the reportID parameter and does not create a new one. Do you have an ETA for it? Or maybe such an endpoint already exists?

@melvin-bot melvin-bot bot removed the Overdue label May 17, 2024
Copy link

melvin-bot bot commented May 19, 2024

@robertjchen @kevinksullivan @war-in @nkdengineer this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@melvin-bot melvin-bot bot added the Overdue label May 19, 2024
@robertjchen
Copy link
Contributor

robertjchen commented May 20, 2024

Looks great! 🤩 I believe the API call involved with this flow is ApproveMoneyRequest. Could you add a new optional string parameter for an optimisticHoldReportID and pass the reportID for the optimistic report?

We will need to build out the backend portion to use it, but we can add the parameter for now! 👍

@melvin-bot melvin-bot bot removed the Overdue label May 20, 2024
@melvin-bot melvin-bot bot removed the Overdue label Jul 22, 2024
@robertjchen robertjchen added the Reviewing Has a PR in review label Jul 23, 2024
@robertjchen
Copy link
Contributor

Backend Auth PR now under review!

@robertjchen
Copy link
Contributor

Backend PR was deployed, @war-in let me know if you need anything else to complete the App PR, thanks! 🙇

@war-in
Copy link
Contributor

war-in commented Jul 25, 2024

Frontend draft PR is going through an internal (SWM) review. Will mark it as ready for review ASAP 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Jul 25, 2024
@war-in
Copy link
Contributor

war-in commented Jul 25, 2024

PR marked as ready for review

@robertjchen
Copy link
Contributor

PR was merged and on the way out!

@ZhenjaHorbach
Copy link
Contributor

@robertjchen
@kevinksullivan
Could you please assign me to this issue since I reviewed this PR ?

@trjExpensify
Copy link
Contributor

Assigned!

Copy link

melvin-bot bot commented Jul 26, 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.

@robertjchen
Copy link
Contributor

^ The above is not a blocker. Explanation

@robertjchen
Copy link
Contributor

We can close this out once: #42573 hits prod, and track any successor issues on the main/parent issue: https://github.com/Expensify/Expensify/issues/274076

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 29, 2024
@melvin-bot melvin-bot bot changed the title [Held requests] When partial approving report, long delay creating new report for held expense(s) [HOLD for payment 2024-08-05] [Held requests] When partial approving report, long delay creating new report for held expense(s) Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 29, 2024
Copy link

melvin-bot bot commented Jul 29, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.13-4 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-08-05. 🎊

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

  • @war-in does not require payment (Contractor)
  • @ZhenjaHorbach requires payment (Needs manual offer from BZ)
  • @nkdengineer requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jul 29, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@ZhenjaHorbach] The PR that introduced the bug has been identified. Link to the PR:
  • [@ZhenjaHorbach] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@ZhenjaHorbach] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@ZhenjaHorbach] Determine if we should create a regression test for this bug.
  • [@ZhenjaHorbach] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@robertjchen robertjchen changed the title [HOLD for payment 2024-08-05] [Held requests] When partial approving report, long delay creating new report for held expense(s) [Held requests] When partial approving report, long delay creating new report for held expense(s) Jul 29, 2024
@github-project-automation github-project-automation bot moved this from Release 2: Summer 2024 (Aug) to Done in [#whatsnext] #wave-collect Jul 29, 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. Weekly KSv2
Projects
No open projects
Archived in project
Development

No branches or pull requests

9 participants