Open
Description
NetBox version
v4.3.2
Feature type
Change to existing functionality
Proposed functionality
I would like the Object Selector View to have configurable default search fields.
I believe this can be done via allowing admins to extend the selector_fields attributes in filterset_forms, similar to how admins can extend table default views.
This may be configured via a new setting such as DEFAULT_OBJECT_SELECTION_FIELDS
and look something like
DEFAULT_OBJECT_SELECTION_FIELDS = {
'dcim.Site': [
'filter_id'. 'q', 'region_id', 'group_id', 'cf_custom_field_name'
]
}
Resulting in the effective selection value:
class SiteFilterForm(TenancyFilterForm, ContactModelFilterForm, NetBoxModelFilterSetForm):
model = Site
...
selector_fields = ('filter_id', 'q', 'region_id', 'group_id','cf_custom_field_name')
and the ui presented to the user:
Use case
My team has a custom field we use when selecting sites often, this would smooth out the workflow and let as add the 'cf_custom_field' selector as a default option improving user experience.
Database changes
None
External dependencies
None