netbox
netbox copied to clipboard
Ability to filter objects (devices/vm, etc) by Contact with specific Contact role
NetBox version
v3.7.3
Feature type
New functionality
Proposed functionality
This is an extension of https://github.com/netbox-community/netbox/issues/9239 and https://github.com/netbox-community/netbox/pull/8742
At the moment it is not possible to filter a specific object-type (for example vm) by a contact that has a specific role.
(GUI: Virtualization/Virtual Machines/Filters
)
For example:
VM | Contact | Contact Role |
---|---|---|
vm1 | Mario | Admin |
vm1 | Luigi | User |
vm2 | Luigi | Admin |
vm2 | Mario | User |
Task: "Filter VMs where Mario has the Contact Role Admin"
Behavior: At the moment it shows all vms where Mario is a Contact OR any Contact has the Role Admin
Expected behavior: Show all vms where Mario has the Role Admin (Contact Assignment)
I know there is a filter in tenancy/contact-assignments/
already. It would be really usefull to be able to use it in the above mentioned filters as well.
Use case
It would allow to filter Objects for a user with a specific role combined with additional filters (In case of VM for example by status, location or anything else)
"Show me all VMs with Status Maintenance
where I (UserXYZ) have the Contact Role Admin"
Database changes
I don't know
External dependencies
None I guess?
Graphical representation:
I tested and was not able to reproduce the issue.
Your screenshots don't really show an exact reproduction of my UseCase. In your screenshot the Users have the same roles on both VMs, in my example the Users have switched roles on the VMs.
I fixed it, and I was able to reproduce the error.
We need to verify if the search will do it using the "contact AND his role" or "contact" and "role" as separate fields (current).
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.