Related Interfaces are grayed out on multi inferface edit
NetBox Edition
NetBox Community
NetBox Version
V4.4.0
Python Version
3.10
Steps to Reproduce
- Select multiple interface on a device
- Click on "Edit Selected"
- No possible to select one of the Related Interfaces (Parent, Bridge, LAG) because the fields are grayed out
Expected Behavior
Normally we see all interfaces in these boxes
Observed Behavior
boxes are just grayed out
I believe this is the result of changes implementing #19735 (PR #19774), which saw a lot of the bulk actions machinery being refactored. In the shuffle, I believe the "Bulk Edit" button (and very likely other bulk actions buttons as well) lost the ability to add a device=<id> GET parameter to its formaction URL parameter when used inside of a object child view.
Hi! Thanks for the report and the earlier analysis. This does look consistent with the bulk actions refactor.
I’ve been experimenting with a possible fix, but I’m not 100% sure it’s the preferred approach. My idea is to handle the “child view” case (e.g. device → interfaces) by detecting the parent object in the template context and then adding the parent’s pk (e.g. device=<pk>) into the bulk edit URL params inside the BulkEdit ObjectAction class. This restores the missing scoping so the “related interfaces” fields (Parent/Bridge/LAG) are populated/enabled during multi-edit.
If that direction sounds reasonable to the maintainers, I’m happy to open a PR so we can discuss the approach. Thanks again!
Thanks @pheus!