-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Coming from this issue, we've noticed that when a transaction gets split and then gets put into it's own report it doesn't remove the report it's part of. When a report only has 1 transaction and that transaction gets deleted so should the report. This was identified as both a backend issue and a frontend issue, so the purpose of this issue is to handle the backend portion of work. The frontend will handle the optimistic data handling.
Repro steps
- Go to staging.new.expensify.com
- Go to workspace chat
- Create an expense
- Open the expense report
- Click More > Split
- Click Save
- Open any split
- Click Report field > Create report
- Go back to workspace chat
- Right click on the report with one split > Delete
- Delete the report
- Click on the empty report
Expected behavior: When removing a split transaction during a revert-split flow, we should determine whether the removed transaction is the last expense in its report. If it's true, the report should also be removed.
Actual behavior: When removing a split transaction during a revert-split flow, only the transaction is removed, and an empty report is left behind.
Command that needs to be updated
RevertSplitTransaction
Metadata
Metadata
Assignees
Labels
Type
Projects
Status