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-07-18] [$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan #65252
Version Number: Reproducible in staging?: yes Reproducible in production?: Feature not in prod yet 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:@dylanexpensify Slack conversation (hyperlinked to channel name):
Action Performed:
Global Create -> Create expense
Select Scan tab -> Enable Multi-Scan toggle
Capture a few receipts
Tap on a receipt in the bottom carousel with receipt previews
Delete the receipt
Expected Result:
In the confirmation screen, the draft transaction initially created for the deleted receipt should not exist.
Actual Result:
The draft transaction is not deleted. Only the receipt is deleted.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Select the officially supported platforms where the issue was reproduced:
Android: App
Android: mWeb Chrome
iOS: App
iOS: mWeb Safari
iOS: mWeb Chrome
Windows: Chrome
MacOS: Chrome / Safari
MacOS: Desktop
Platforms Tested:
On which of our officially supported platforms was this issue tested:
changed the title [-][Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/-][+][$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/+]on Jul 1, 2025
update: switching removeTransactionReceipt for removeDraftTransaction fixes that problem, however when testing this I found another bug which happens after deleting the first photo/draftTransaction. The multi scan closes or hangs in the loading state. This has to do with the logic of creating the first draft transaction in the optimistic state. This is also why the first transaction has the id of 1. I will look for a way to fix this tomorrow
update: following up to the previous update, switching removeTransactionReceipt for removeDraftTransaction solves the problem of confirmation page's invalid report, however removing the first photo results in another bug.
The problem indeed is with the optimistic transaction being created and the logic breaking when removing that draft transaction which is the first photo in the filmstrip. Next photo taken is set only to have basic information from the file like source but no transactionID which is then compared to the initialTransactionID (the optimistic transaction id) which is not there anymore and the logic breaks down.
When the first photo is removed and user tries to navigate to confirmation page, the isMultiScanEnabled set to false from resetIOUTypeIfChanged(transactionRequestType); call in IOURequestStartPage because iouRequestType is undefined (transaction does not have that field).
I will be ooo from tomorrow but I hope this will help someone who picks this issue up.
changed the title [-][$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/-][+][Due for payment 2025-07-18] [$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/+]on Jul 11, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.79-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307@dylanexpensify 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]
[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. Yes
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Tap FAB -> Create expense
Select Scan tab
Enable Multi-Scan toggle
Capture a 3-4 receipts
Tap on the first receipt in the bottom carousel.
Delete the receipt. Make sure the receipt is deleted and doesn't show in the carousel anymore.
Navigate to the confirmation screen.
Make sure only non-deleted receipts/transactions are displayed.
Repeat steps 1-8 deleting different receipts in the step 5.
Activity
melvin-bot commentedon Jul 1, 2025
Current assignee @dylanexpensify is eligible for the Bug assigner, not assigning anyone new.
[-][Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/-][+][$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/+]melvin-bot commentedon Jul 1, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021940031624360843372
melvin-bot commentedon Jul 1, 2025
Current assignee @dukenv0307 is eligible for the External assigner, not assigning anyone new.
Swor71 commentedon Jul 1, 2025
update: switching
removeTransactionReceiptforremoveDraftTransactionfixes that problem, however when testing this I found another bug which happens after deleting the first photo/draftTransaction. The multi scan closes or hangs in the loading state. This has to do with the logic of creating the first draft transaction in the optimistic state. This is also why the first transaction has the id of1. I will look for a way to fix this tomorrowSwor71 commentedon Jul 2, 2025
update: following up to the previous update, switching
removeTransactionReceiptforremoveDraftTransactionsolves the problem of confirmation page's invalid report, however removing the first photo results in another bug.The problem indeed is with the optimistic transaction being created and the logic breaking when removing that draft transaction which is the first photo in the filmstrip. Next photo taken is set only to have basic information from the file like source but no transactionID which is then compared to the initialTransactionID (the optimistic transaction id) which is not there anymore and the logic breaks down.
When the first photo is removed and user tries to navigate to confirmation page, the
isMultiScanEnabledset to false fromresetIOUTypeIfChanged(transactionRequestType);call inIOURequestStartPagebecauseiouRequestTypeisundefined(transaction does not have that field).I will be ooo from tomorrow but I hope this will help someone who picks this issue up.
11 remaining items
[-][$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/-][+][Due for payment 2025-07-18] [$250] [Multi-Scan] Delete the draft transaction when deleting a receipt while creating expenses in bulk with Multi-Scan[/+]melvin-bot commentedon Jul 11, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.79-11 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-07-18. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jul 11, 2025
@dukenv0307 @dylanexpensify 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]
melvin-bot commentedon Jul 18, 2025
Payment Summary
Upwork Job
BugZero Checklist (@dylanexpensify)
dylanexpensify commentedon Jul 21, 2025
Payment summary:
Contributor+: @dukenv0307 $250 via NewDot
Please apply/request!
dylanexpensify commentedon Jul 22, 2025
@dukenv0307 please complete checklist!
dukenv0307 commentedon Jul 22, 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: https://github.com/Expensify/App/pull/63352/files#r2223188199
[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. Yes
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
dukenv0307 commentedon Jul 22, 2025
@dylanexpensify I completed the checklists
flaviadefaria commentedon Aug 6, 2025
$250 Approved for @dukenv0307