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

[$250] Expense - Error occurs when employee delete expense #48646

Open
1 of 6 tasks
lanitochka17 opened this issue Sep 5, 2024 · 15 comments
Open
1 of 6 tasks

[$250] Expense - Error occurs when employee delete expense #48646

lanitochka17 opened this issue Sep 5, 2024 · 15 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@lanitochka17
Copy link

lanitochka17 commented Sep 5, 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.29-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. Navigate to staging.new.expensify.com as an employee
  2. Navigate to an admin's workspace
  3. Submit an expense
  4. Navigate to staging.new.expensify.com as an admin
  5. Admin pays the expense
  6. Cancel the payment
  7. Employee deletes the expense after the admin cancels the expense

Expected Result:

The payment should be deleted without any problems

Actual Result:

An 'Unexpected error deleting the expenses' message occurs

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

Bug6592970_1725459918385.bandicam_2024-09-04_15-52-55-620.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021834200864229937336
  • Upwork Job ID: 1834200864229937336
  • Last Price Increase: 2024-09-19
  • Automatic offers:
    • akinwale | Contributor | 103928886
Issue OwnerCurrent Issue Owner: @akinwale
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 5, 2024
Copy link

melvin-bot bot commented Sep 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.

@lanitochka17
Copy link
Author

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

@bernhardoj
Copy link
Contributor

Proposal

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

Error is shown when an employee is trying to delete a canceled expense.

What is the root cause of that problem?

When the admin pays and cancels the expense, the expense report becomes in closed state. When the employee trying to delete the expense, the BE will return an expense.
image

The error happens when we are trying to add another expense to the report too.
image

So, it seems like the BE doesn't allow adding or deleting expenses to/from an expense report.

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

Don't allow adding or deleting expenses to/from an expense report by returning false in canAddOrDeleteTransactions.

App/src/libs/ReportUtils.ts

Lines 1663 to 1665 in cc1c7d0

if (isReportApproved(moneyRequestReport) || isSettled(moneyRequestReport?.reportID)) {
return false;
}

if (isReportApproved(moneyRequestReport) || isSettled(moneyRequestReport?.reportID) || isClosedReport(moneyRequestReport)) {
    return false;
}

@melvin-bot melvin-bot bot added the Overdue label Sep 9, 2024
Copy link

melvin-bot bot commented Sep 10, 2024

@kevinksullivan Eep! 4 days overdue now. Issues have feelings too...

@kevinksullivan kevinksullivan added the External Added to denote the issue can be worked on by a contributor label Sep 12, 2024
@melvin-bot melvin-bot bot changed the title Expense - Error occurs when employee delete expense [$250] Expense - Error occurs when employee delete expense Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

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

Looping in another BZ as I'm going OOO

Copy link

melvin-bot bot commented Sep 12, 2024

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

@melvin-bot melvin-bot bot removed the Overdue label Sep 12, 2024
@kevinksullivan kevinksullivan added Overdue and removed Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
@melvin-bot melvin-bot bot removed the Overdue label Sep 12, 2024
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 12, 2024
@kevinksullivan kevinksullivan added Help Wanted Apply this label when an issue is open to proposals by contributors Bug Something is broken. Auto assigns a BugZero manager. labels Sep 12, 2024
Copy link

melvin-bot bot commented Sep 12, 2024

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

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

Copy link

melvin-bot bot commented Sep 12, 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.

@kevinksullivan kevinksullivan self-assigned this Sep 12, 2024
Copy link

melvin-bot bot commented Sep 17, 2024

@akinwale, @sonialiap, @kevinksullivan Eep! 4 days overdue now. Issues have feelings too...

@melvin-bot melvin-bot bot added the Overdue label Sep 17, 2024
Copy link

melvin-bot bot commented Sep 19, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Copy link

melvin-bot bot commented Sep 19, 2024

@akinwale @sonialiap @kevinksullivan 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 Sep 19, 2024

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

@akinwale
Copy link
Contributor

We can move forward with @bernhardoj's proposal here.

🎀👀🎀 C+ reviewed.

Copy link

melvin-bot bot commented Sep 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
Status: No status
Development

No branches or pull requests

6 participants