-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Filtered Bulk Delete Ends Up Deleting Everything #9374
Comments
@nathanclevenger I'm unable to reproduce this within either our test suite or the reproduction repo you've provided. Here's a quick screen recording from my end using the steps you've outlined: issue-9374-no-repro.mp4 |
Similar to #9264, maybe the issue only appears if you follow the instructions exactly? Your setup has 3 and you select 1, while their setup has 4 and selected 3. |
Ahh @nathanclevenger missed a step, just coming back in here to confirm but I see @tyteen4a03 is too quick for me. Looking into it. |
For the record it's the "Hit the link to "Select All x Resources" step that reproduces this issue. Not the number of documents. |
Yes, it's the |
🚀 This is included in version v3.0.2 |
This issue has been automatically locked. |
Describe the Bug
If a list view is searched, and then the
Select all x Resources
is clicked, and then if delete is selected, all documents from the collection are deleted not just the filtered/selected items.This is an extremely serious issue - we just had to roll back a database to backup and lost data because of this bug.
Link to the code that reproduces this issue
https://github.com/nathanclevenger/payload-repro
Reproduction Steps
Go to a collection list view:
Enter a search term:
Hit the top checkbox to select all:
Hit the link to "Select All x Resources:
Hit Delete, and Confirm: (note, it shows the filtered count here)
Then all resources in the collection will be deleted:
I confirmed this exists in both Mongo and Postgres
Which area(s) are affected? (Select all that apply)
Not sure
Environment Info
The text was updated successfully, but these errors were encountered: