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 2025-02-05] [$250] Add report action for deleting expenses off of processing reports #53479

Open
garrettmknight opened this issue Dec 3, 2024 · 45 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

Comments

@garrettmknight
Copy link
Contributor

garrettmknight commented Dec 3, 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: N/A
Reproducible in staging?: N/A
Reproducible in production?: N/A
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
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: None
Issue reported by: @sakluger
Slack conversation (hyperlinked to channel name): It's in eng, but it's more #expense

Action Performed:

  1. Create new workspace (Instant Submit will be enabled by default)
  2. Enable Approvals
  3. Invite Submitter A
  4. Have Submitter A create an expense
  5. Have Submitter A delete the expense

Expected Result:

When we make a change to an expense on a processing report, we add a report action indicating the change. We'd expect to see something like:

User Name deleted an expense on this report, [Merchant] - [Amount]

If it was me deleting it, it'd look like this:

Garrett Knight deleted an expense on this report, Nando's - £12.77

Actual Result:

The expense is deleted without a trace, confusing approvers when they've seen that an expense was once on the report.

Workaround:

None

Platforms:

All

Screenshots/Videos

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021867259873329835185
  • Upwork Job ID: 1867259873329835185
  • Last Price Increase: 2024-12-12
  • Automatic offers:
    • brunovjk | Reviewer | 105310844
Issue OwnerCurrent Issue Owner: @zanyrenney
@garrettmknight garrettmknight added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Dec 3, 2024
Copy link

melvin-bot bot commented Dec 3, 2024

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

@nkdengineer
Copy link
Contributor

Proposal

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

The expense is deleted without a trace, confusing approvers when they've seen that an expense was once on the report.

What is the root cause of that problem?

When we delete a money request, we don't add any report action to keep track of the change

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

  1. Define a new report action for delete expense like DELETE_EXPENSE

  2. In deleteMoneyRequest, create an optimistic action, remove pendingAction in sucessData, and add an error in failureData in the expense report if shouldDeleteIOUReport is false and the report is a processing report. This action will have some data in originalMessage like amount, merchant, currency

function deleteMoneyRequest(transactionID: string, reportAction: OnyxTypes.ReportAction, isSingleTransactionView = false) {

  1. Add the deleteExpenseReportActionID param as the reportActionID of the optimistic action above here

const parameters: DeleteMoneyRequestParams = {

  1. Define a function to get the translation for the action and
  • Add a case for this action here for the alternative text in LHN

  • Add a case in ReportActionItem here for the action in ReportScreen

  • Add a case in getReportName function here for thread header translation

  • Add a case in here for the copy message

  1. Require backend change
  • Introduce a new param in DeleteMoneyRequest API like deleteExpenseReportActionID and use this ID to generate a new delete expense action and return it to front end.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

We can define a new test case in IOUTest here. We need to create mock data accordingly and verify a new delete expense action is created in this case when we call DeleteMoneyRequest API.

describe('deleteMoneyRequest', () => {

What alternative solutions did you explore? (Optional)

NA

@garrettmknight garrettmknight moved this to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 4, 2024
@youssef-lr youssef-lr self-assigned this Dec 5, 2024
@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

@youssef-lr, @zanyrenney Whoops! This issue is 2 days overdue. Let's get this updated quick!

@zanyrenney
Copy link
Contributor

hey @youssef-lr are you working on this one, or should we be assigning external for them to review the proposal above? Thanks!

@melvin-bot melvin-bot bot removed the Overdue label Dec 10, 2024
@youssef-lr
Copy link
Contributor

@zanyrenney I should have the backend PRs ready today, but we can also assign someone to work on the frontend PRs. @nkdengineer's proposal LGTM, except that we should only record this action if the report is PROCESSING.

@youssef-lr
Copy link
Contributor

youssef-lr commented Dec 12, 2024

Made some progress locally and should have the first Auth PR ready by EOD

@zanyrenney
Copy link
Contributor

great update, thank you so much @youssef-lr !

@zanyrenney zanyrenney added the External Added to denote the issue can be worked on by a contributor label Dec 12, 2024
@melvin-bot melvin-bot bot changed the title Add report action for deleting expenses off of processing reports [$250] Add report action for deleting expenses off of processing reports Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

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

melvin-bot bot commented Dec 12, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

❌ There was an error making the offer to @nkdengineer for the Contributor role. The BZ member will need to manually hire the contributor.

Copy link

melvin-bot bot commented Dec 12, 2024

📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Dec 12, 2024

❌ There was an error making the offer to @nkdengineer for the Contributor role. The BZ member will need to manually hire the contributor.

@youssef-lr
Copy link
Contributor

youssef-lr commented Dec 12, 2024

I had to make PRs in the other repos to test stuff so that shifted my focus away from finishing the tests of the Auth PR. It should be ready tomorrow for review. @nkdengineer you can continue working starting from this draft PR #54079, please make a branch off of it.

@melvin-bot melvin-bot bot removed the Overdue label Jan 6, 2025
@youssef-lr
Copy link
Contributor

Yes the backend is done. Can we resume the frontend PR?

@brunovjk
Copy link
Contributor

brunovjk commented Jan 6, 2025

Now it's up to you @nkdengineer. Thank you all.

@nkdengineer
Copy link
Contributor

Will open PR soon

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jan 9, 2025
@brunovjk
Copy link
Contributor

brunovjk commented Jan 9, 2025

Once you have a draft PR ready please assign me to review I may suggest some changes early.

Hi @nkdengineer, thank you for the PR, is it ready for review?

cc: @youssef-lr

@sakluger
Copy link
Contributor

Checking in on this one as my customer keeps seeing expenses disappear from reports without comments. @nkdengineer what's the status on your PR?

@brunovjk
Copy link
Contributor

We're waiting for @youssef-lr to take a look at the PR and the comments we made there. I've already bumped them on slack.

@youssef-lr
Copy link
Contributor

I'm on it today @brunovjk

@youssef-lr
Copy link
Contributor

Checking the PR now

@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 29, 2025
@melvin-bot melvin-bot bot changed the title [$250] Add report action for deleting expenses off of processing reports [HOLD for payment 2025-02-05] [$250] Add report action for deleting expenses off of processing reports Jan 29, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 29, 2025
Copy link

melvin-bot bot commented Jan 29, 2025

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

Copy link

melvin-bot bot commented Jan 29, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.90-6 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 2025-02-05. 🎊

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

Copy link

melvin-bot bot commented Jan 29, 2025

@brunovjk @zanyrenney @brunovjk 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]

@brunovjk
Copy link
Contributor

I will complete the checklist the day before payday :D

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Feb 4, 2025
@brunovjk
Copy link
Contributor

brunovjk commented Feb 4, 2025

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other: akluger
  • [Contributor] 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: No PR directly created this bug.

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal

Test:

  1. Create new workspace (Instant Submit will be enabled by default)
  2. Enable Approvals
  3. Invite Submitter A
  4. Have Submitter A create some expenses
  5. Have Submitter A delete the expense
  6. Verify that: deleted an expense on this report, ${merchant} - ${amount} is shown in chat

Do we agree 👍 or 👎

@dylanexpensify dylanexpensify moved this from Bugs and Follow Up Issues to Hold for Payment in [#whatsnext] #expense Feb 4, 2025
@zanyrenney
Copy link
Contributor

@zanyrenney
Copy link
Contributor

@brunovjk requires payment automatic offer (Reviewer)
@nkdengineer requires payment (Needs manual offer from BZ)

@zanyrenney
Copy link
Contributor

@zanyrenney
Copy link
Contributor

payment summary

paid $250 to @brunovjk via upwork

@nkdengineer
Copy link
Contributor

@zanyrenney accepted invitation, thanks

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
Projects
Status: Hold for Payment
Development

No branches or pull requests

6 participants