Add a query filter for every object type #1732

Closed
opened 2025-12-29 16:34:49 +01:00 by adam · 2 comments
Owner

Originally created by @jeremystretch on GitHub (May 21, 2018).

Originally assigned to: @jeremystretch on GitHub.

Issue type

[x] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.3.3

Description

For the sake of consistency, we should have a query filter for each object type, even if it's empty. Some views, like BulkEditView and BulkDeleteView, rely on the presence of a filter for performing bulk operations on all objects matching a parameter (e.g. deleting all devices matching a certain name, instead of just those selected in the list).

This was inspired by the issue raised in #2097.

Originally created by @jeremystretch on GitHub (May 21, 2018). Originally assigned to: @jeremystretch on GitHub. ### Issue type [x] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.3.3 ### Description For the sake of consistency, we should have a query filter for each object type, even if it's empty. Some views, like BulkEditView and BulkDeleteView, rely on the presence of a filter for performing bulk operations on _all_ objects matching a parameter (e.g. deleting all devices matching a certain name, instead of just those selected in the list). This was inspired by the issue raised in #2097.
adam added the status: acceptedtype: housekeeping labels 2025-12-29 16:34:49 +01:00
adam closed this issue 2025-12-29 16:34:49 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 14, 2020):

Per #3998 this should include the console/power/interface connection views as well.

@jeremystretch commented on GitHub (Feb 14, 2020): Per #3998 this should include the console/power/interface connection views as well.
Author
Owner

@jeremystretch commented on GitHub (Oct 8, 2021):

It looks like this issue has mostly been addressed already. The remaining filtersets which need a q filter are:

  • dcim/DeviceTypeComponentFilterSet
  • dcim/ConnectionFilterSet
  • extras/WebhookFilterSet
  • extras/CustomFieldFilterSet
  • extras/CustomLinkFilterSet
  • extras/ExportTemplateFilterSet
  • extras/ImageAttachmentFilterSet
  • users/ObjectPermissionFilterSet
@jeremystretch commented on GitHub (Oct 8, 2021): It looks like this issue has mostly been addressed already. The remaining filtersets which need a `q` filter are: - dcim/DeviceTypeComponentFilterSet - dcim/ConnectionFilterSet - extras/WebhookFilterSet - extras/CustomFieldFilterSet - extras/CustomLinkFilterSet - extras/ExportTemplateFilterSet - extras/ImageAttachmentFilterSet - users/ObjectPermissionFilterSet
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1732