Repository navigation
[Payment due @gijoe0295] Allow admins to delete a member report containing cash or card expenses - #101223
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@MelvinBot Merge main |
…/App into follow-up-678343 Co-authored-by: Hans Vu <hungvu193@users.noreply.github.com> # Conflicts: # src/hooks/useExpenseActions.ts # src/libs/ReportUtils.ts
|
I merged I resolved two conflicts:
I couldn't run typecheck or lint locally. Please confirm the CI checks pass. |
|
@gijoe0295 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🚧 flaviadefaria has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
LGTM! I haven't been able to test what happens when an admin tries to delete a report with Expensify card transactions, as I don't have access to one with actual transactions. Are you all able to test this? If so, can you post a recording? |
I used a mock Ecard transaction on my local, let me do it again and record a new video. |
|
@gijoe0295 You can review the code in the meantime. |
|
Here's the video regarding Ecard transactions (I used mock data to insert these transactions to my local Ecard): Screen.Recording.2026-09-30.at.11.35.47.mov |
I noticed on the recording that all Ecard transactions are pending. Did you test this with non-pending transactions? Also, I wonder if we should display the delete button, but then display an error message to avoid confusion from users, especially in the scenario where a report has both Ecard and non-Ecard expenses. Error message: Expensify Card transactions can’t be unreported. Move them to another report before deleting. |
@gijoe0295 you're on main there right? Or in this PR? Anyway, please continue with the PR logic, we gonna fix 2 issues here 😄 |
I do yeah. They're on the same case, we're checking for the type here (Ecard transaction).
I can do it but do you think we need design decision here? |
I thought we already displayed an error message for this, which Joe posted here. So my understanding is that we'd just be updating the copy for Admins, but happy to get the Design team involved. |
Oh that was a different one where we try to delete transaction without auto reporting enable. |
9100a26 to
342430a
Compare
|
@gijoe0295 @hungvu193 I see you’re actively working on this PR — thank you! It’d be great if we could get it merged by the end of this week, as I’d like to include this change in the next product update. Do you think we can work towards that timeline? Thanks! |
|
@gijoe0295 Could you prioritize the review today? |
|
@gijoe0295 can you prioritize this review today? We're hoping to merge this by tomorrow so we can announce the change in the next product update, which means it needs to be live by next week. |
|
On it now |
|
🎯 @gijoe0295, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
@hungvu193 We have conflicts |
|
@MelvinBot Help me resolve conflicts and merge main please. |
Co-authored-by: Hans Vu <hungvu193@users.noreply.github.com> # Conflicts: # src/libs/ReportUtils.ts
|
I merged There was one conflict. It was in the
|
|
@MelvinBot The failing test is flaky right? |
|
@arosiclair Requested review from you since you were assigned on the original issue, I don't know why Melvin doesn't auto trigger random puller bear. |
|
Yes, it looks flaky and unrelated to this PR. Re-running the failed job should clear it. Evidence
I couldn't re-run the job from here. Use Re-run failed jobs on the failed run. |
# Conflicts: # tests/unit/ReportUtilsTest.ts
73c7e0e to
324edf8
Compare
|
🚧 arosiclair has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/arosiclair in version: 9.5.7-0 🚀
|
|
No help site update is needed: this PR adjusts who can delete a report containing card expenses and rewords the delete confirmation, but no sentence in an existing article describes those rules, so none became incorrect. |


Explanation of Change
Allow admins to delete a member report containing cash or card expenses except Expensify card transaction
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/681901
$ #102279
PROPOSAL: N/A
Tests
Prerequisite:
Use the csv below to import card transaction:
test.csv
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-09-28.at.17.56.39.mov
Screen.Recording.2026-09-28.at.17.07.45.mov