Object counts dashboard widget filters should employ standard UI filters rather than low-level queryset filters #8129

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

Originally created by @jeremystretch on GitHub (May 26, 2023).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v3.5.2

Python version

3.8

Steps to Reproduce

When configuring an "object counts" dashboard widget to employ arbitrary filtering parameters, the user is expected to enter valid low-level queryset filters, as opposed to the high-level filters utilized externally by the UI and API.

For example, filtering a list of objects by tenant slug is done in the UI as:

?tenant=my-tenant

This maps to an underlying queryset filter of

tenant__slug=my-tenant

Configuring filters for an object counts dashboard widget currently requires the later form, which differs from every other area of the UI.

Expected Behavior

Filter configuration should be defined in the format consistent with other areas of the UI (the first format in the above example), as is the case for object list widget URL parameters.

Observed Behavior

Filter configurations that are not valid queryset filter parameters will trigger a validation failure when attempting to save the widget configuration.

Originally created by @jeremystretch on GitHub (May 26, 2023). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v3.5.2 ### Python version 3.8 ### Steps to Reproduce When configuring an "object counts" dashboard widget to employ arbitrary filtering parameters, the user is expected to enter valid low-level queryset filters, as opposed to the high-level filters utilized externally by the UI and API. For example, filtering a list of objects by tenant slug is done in the UI as: ``` ?tenant=my-tenant ``` This maps to an underlying queryset filter of ``` tenant__slug=my-tenant ``` Configuring filters for an object counts dashboard widget currently requires the later form, which differs from every other area of the UI. ### Expected Behavior Filter configuration should be defined in the format consistent with other areas of the UI (the first format in the above example), as is the case for object list widget URL parameters. ### Observed Behavior Filter configurations that are not valid queryset filter parameters will trigger a validation failure when attempting to save the widget configuration.
adam added the type: bugstatus: accepted labels 2025-12-29 20:32:48 +01:00
adam closed this issue 2025-12-29 20:32:48 +01:00
Author
Owner

@gdprdatasubect commented on GitHub (May 28, 2023):

That's kinda what i had in mind with #12136 in the first place :D Glad this gets addressed :)

@gdprdatasubect commented on GitHub (May 28, 2023): That's kinda what i had in mind with #12136 in the first place :D Glad this gets addressed :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8129