You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-02-13] [$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search #54036
Version Number: 9.0.75-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A 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):ibellicotest+91@gmail.com Issue reported by: Applause - Internal Team Component Money Requests
Action Performed:
Open the staging.new.expensify.com website
Open self DM
Tap on "+" button and select "Track Expense"
Complete the creation flow
Once navigated to chat, tap on "Categorize it"
Select any category
Add a merchant
Submit the expense to any workspace
Once navigated to workspace chat, long tap on the submitted expense and search for the "Delete Expense" option
Open the expense report
Tap on the header and look for the "Delete Expense" option
Go to search section
Long tap over the expense and delete it
Expected Result:
The user should be able to delete the tracked expense from context menu on chat, from report header or from search section
Actual Result:
"Delete Expense" option is not displayed on context menu or on report header after submitting a categorized track expense, but the expense can be deleted from search section
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6692275_1734013745016.No_Delete.mp4
Edited by proposal-police: This proposal was edited at 2024-12-20 12:01:06 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense -Categorized track expense can´t be deleted from report but can be deleted on search
What is the root cause of that problem?
The canAddOrDeleteTransactions function returns false early because the policy has autoReporting set to instant and approvalMode set to optional and it doesn't expect hasOnlyNonReimbursableTransactions to return false a for moneyRequestReport like this.
What changes do you think we should make in order to solve the problem?
We should either merge reimbursable as true or delete the reimbursable attribute from the original transaction and its draft whichever is more reasonable for the transaction.
changed the title [-]Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/-][+][$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/+]on Dec 13, 2024
changed the title [-][$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/-][+][Due for payment 2025-02-13] [$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/+]on Feb 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.94-25 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@jayeshmangwani@sonialiap@jayeshmangwani 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]
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:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[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: I don't think this is the result of any PR; it’s just that this case wasn’t considered when categorizing the self-DM expense.
[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: N/A
[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.
Activity
melvin-bot commentedon Dec 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.Tony-MK commentedon Dec 13, 2024
Edited by proposal-police: This proposal was edited at 2024-12-20 12:01:06 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense -Categorized track expense can´t be deleted from report but can be deleted on search
What is the root cause of that problem?
The
canAddOrDeleteTransactionsfunction returnsfalseearly because the policy hasautoReportingset toinstantandapprovalModeset tooptionaland it doesn't expecthasOnlyNonReimbursableTransactionsto returnfalsea formoneyRequestReportlike this.App/src/libs/ReportUtils.ts
Lines 1825 to 1828 in e27c5ea
This is because
transaction?.reimbursablewas initially set asfalseand has not been adjusted by either the FE or BE.App/src/libs/TransactionUtils/index.ts
Lines 551 to 556 in 78337bd
What changes do you think we should make in order to solve the problem?
We should either merge
reimbursableastrueor delete thereimbursableattribute from the original transaction and its draft whichever is more reasonable for the transaction.In
getDeleteTrackExpenseInformation, let's extend theshouldDeleteTransactionFromOnyxifstatement with anelse ifstatement checking ifisMovingTransactionFromTrackExpenseistruelike the snippet below.This will fix the bug while the user is offline but we have to fix the backend to do the same to prevent it from occurring while online.
melvin-bot commentedon Dec 13, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021867523445838450965
[-]Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/-][+][$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/+]melvin-bot commentedon Dec 13, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (
External)melvin-bot commentedon Dec 13, 2024
Current assignee @sonialiap is eligible for the Bug assigner, not assigning anyone new.
80 remaining items
[-][$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/-][+][Due for payment 2025-02-13] [$250] Expense -Categorized track expense can´t be deleted from report but can be deleted on search[/+]melvin-bot commentedon Feb 6, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Feb 6, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.94-25 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-13. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Feb 6, 2025
@jayeshmangwani @sonialiap @jayeshmangwani 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]
jayeshmangwani commentedon Feb 13, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[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: I don't think this is the result of any PR; it’s just that this case wasn’t considered when categorizing the self-DM expense.
[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: N/A
[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 https://github.com/Expensify/Expensify/issues/469982
Regression Test Proposal
Do we agree 👍 or 👎
sonialiap commentedon Feb 13, 2025
Payment summary:
garrettmknight commentedon Feb 28, 2025
$250 approved for @jayeshmangwani