"Confirm Bulk Deletion" selects all records regardless of 'filter' in Platforms #7864

Closed
opened 2025-12-29 20:29:09 +01:00 by adam · 1 comment
Owner

Originally created by @robbagithub on GitHub (Apr 6, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.4.6

Python version

3.8

Steps to Reproduce

  1. Click Devices
  2. Click Platforms
  3. Chose a filter and click search at bottom right of page
  4. Click on checkbox to left of 'Name' Coloum at top of page to select all in returned search
  5. Click on new checkbox above to select all in the matching query (see first image)
  6. Click Red "Delete Selected" button
  7. Confirm Bulk Deletetion shows all records, not filtered ones. (see second image)

Expected Behavior

I expect the 'filtered' delete to only select the filtered records for deletion

  1. Click Devices
  2. Click Platforms
  3. Chose a filter and click search at bottom right of page
  4. Click on checkbox to left of 'Name' Coloum at top of page to select all in returned search
  5. Click on new checkbox above to select all in the matching query (see image)
  6. Click Red "Delete Selected" button
  7. Confirm Bulk Deletetion shows filtered records.

Observed Behavior

Didn't proceed with selecting all data to delete.

image

image

Originally created by @robbagithub on GitHub (Apr 6, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.4.6 ### Python version 3.8 ### Steps to Reproduce 1. Click Devices 2. Click Platforms 3. Chose a filter and click search at bottom right of page 4. Click on checkbox to left of 'Name' Coloum at top of page to select all in returned search 5. Click on new checkbox above to select all in the matching query (see first image) 6. Click Red "Delete Selected" button 7. Confirm Bulk Deletetion shows **all records**, not filtered ones. (see second image) ### Expected Behavior I expect the 'filtered' delete to only select the filtered records for deletion 1. Click Devices 2. Click Platforms 3. Chose a filter and click search at bottom right of page 4. Click on checkbox to left of 'Name' Coloum at top of page to select all in returned search 5. Click on new checkbox above to select all in the matching query (see image) 6. Click Red "Delete Selected" button 7. Confirm Bulk Deletetion shows **filtered records**. ### Observed Behavior Didn't proceed with selecting all data to delete. ![image](https://user-images.githubusercontent.com/22147754/230242584-b5abef82-13bc-48f6-b383-f3888bfe5938.png) ![image](https://user-images.githubusercontent.com/22147754/230242767-d86a2209-bb44-4531-8c56-9d69f066c802.png)
adam added the type: bugstatus: accepted labels 2025-12-29 20:29:09 +01:00
adam closed this issue 2025-12-29 20:29:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 7, 2023):

Thanks for bringing attention to this. This occurs because the filterset class is not defined for the platform model's bulk delete view. A quick audit revealed the same issue with several other models:

  • circuits.CircuitType
  • dcim.DeviceRole
  • dcim.Manufacturer
  • dcim.Platform
  • dcim.InventoryItem
  • dcim.InventoryItemRole
  • dcim.RackRole
  • extras.ConfigContext
  • ipam.Role
  • tenancy.ContactGroup
  • tenancy.ContactRole
  • tenancy.TenantGroup
  • virtualization.ClusterGroup
  • virtualization.ClusterType
@jeremystretch commented on GitHub (Apr 7, 2023): Thanks for bringing attention to this. This occurs because the filterset class is not defined for the platform model's bulk delete view. A quick audit revealed the same issue with several other models: - circuits.CircuitType - dcim.DeviceRole - dcim.Manufacturer - dcim.Platform - dcim.InventoryItem - dcim.InventoryItemRole - dcim.RackRole - extras.ConfigContext - ipam.Role - tenancy.ContactGroup - tenancy.ContactRole - tenancy.TenantGroup - virtualization.ClusterGroup - virtualization.ClusterType
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7864