From 780459d2bfd76d12c4125a31a20c6c0cee26ee09 Mon Sep 17 00:00:00 2001 From: Stephan Blanke Date: Sat, 2 Apr 2022 18:08:48 +0200 Subject: [PATCH 1/2] Closes #8365: Filtering for child devices by parent device --- netbox/dcim/filtersets.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netbox/dcim/filtersets.py b/netbox/dcim/filtersets.py index 504ad69ca..534a71762 100644 --- a/netbox/dcim/filtersets.py +++ b/netbox/dcim/filtersets.py @@ -639,6 +639,11 @@ class DeviceFilterSet(PrimaryModelFilterSet, TenancyFilterSet, ContactModelFilte to_field_name='slug', label='Role (slug)', ) + parent_device_id = django_filters.ModelMultipleChoiceFilter( + field_name='parent_bay__device', + queryset=Device.objects.all(), + label='Parent Device (ID)', + ) platform_id = django_filters.ModelMultipleChoiceFilter( queryset=Platform.objects.all(), label='Platform (ID)', From e575279738c65b659fe68919174c29c00816473d Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 4 Apr 2022 15:58:54 -0400 Subject: [PATCH 2/2] Changelog for #8365 --- docs/release-notes/version-3.1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md index bab66f2ad..e3d75269a 100644 --- a/docs/release-notes/version-3.1.md +++ b/docs/release-notes/version-3.1.md @@ -5,6 +5,7 @@ ### Enhancements * [#8163](https://github.com/netbox-community/netbox/issues/8163) - Show bridge interface members under interface view +* [#8365](https://github.com/netbox-community/netbox/issues/8365) - Enable filtering child devices by parent device ID * [#8785](https://github.com/netbox-community/netbox/issues/8785) - Permit wildcard values in IP address DNS names * [#8790](https://github.com/netbox-community/netbox/issues/8790) - Include site and prefixes columns in VLAN group VLANs table * [#8830](https://github.com/netbox-community/netbox/issues/8830) - Add Checkpoint ClusterXL protocol for FHRP groups