Allow filtering of ObjectVar and MultiObjectVar input selections for scripts #17944
Labels
complexity: low
Requires minimal effort to implement
status: needs owner
This issue is tentatively accepted pending a volunteer committed to its implementation
type: feature
Introduction of new functionality to the application
NetBox version
v4.1.6
Feature type
New functionality
Triage priority
N/A
Proposed functionality
Proposing to extend the functionality of the object selection inputs (ObjectVar and MultiObjectVar) in scripts to be able to filter the selection in the same fashion that's available in the create/edit forms.
I might suggest adding the optional parameters
selector
(boolean with a default of False) andquery_params
(dictionary) to both ObjectVar and MultiObjectVar classes so that it matches the form parameters.selector=True
would show the filter button, and thequery_params
dictionary to be used to apply the initial filtering.Use case
Our NetBox instance relies on a few scripts to assist in creating items. Currently we use separate inputs to control filtering (similar to the old behavior of NetBox). Adding the optional filtering would improve the user experience in the same way filtering improved the user experience when using the create/edit forms.
Database changes
None
External dependencies
None
The text was updated successfully, but these errors were encountered: