[PR #20672] [MERGED] Fixes #20389: Add FilterSet support to BulkRenameView #16005

Closed
opened 2025-12-30 00:25:16 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20672
Author: @pheus
Created: 10/24/2025
Status: Merged
Merged: 10/27/2025
Merged by: @bctiemann

Base: mainHead: 20389-allow-all-bulk-rename


📝 Commits (1)

  • ac7a4ec feat(views): Add FilterSet support to BulkRenameView

📊 Changes

12 files changed (+139 additions, -4 deletions)

View changed files

📝 netbox/circuits/views.py (+8 -0)
📝 netbox/core/views.py (+1 -0)
📝 netbox/dcim/tests/test_views.py (+37 -0)
📝 netbox/dcim/views.py (+29 -0)
📝 netbox/extras/views.py (+13 -0)
📝 netbox/ipam/views.py (+13 -0)
📝 netbox/netbox/views/generic/bulk_views.py (+13 -4)
📝 netbox/tenancy/views.py (+5 -0)
📝 netbox/users/views.py (+3 -0)
📝 netbox/virtualization/views.py (+6 -0)
📝 netbox/vpn/views.py (+8 -0)
📝 netbox/wireless/views.py (+3 -0)

📄 Description

Fixes: #20389

Summary
Make BulkRenameView honor “Select all N matching query”, aligning behavior with BulkEditView/BulkDeleteView.

What changed

  • BulkRenameView now accepts a filterset.
  • When _all/select_all is posted, the target queryset is derived via filterset(request.GET, self.get_queryset(request)); otherwise it uses the posted pk[].
  • Add a test confirming selection (37 interfaces) is fully renamed.

Impact
No UI or API changes; bulk actions now behave consistently across edit/delete/rename.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/20672 **Author:** [@pheus](https://github.com/pheus) **Created:** 10/24/2025 **Status:** ✅ Merged **Merged:** 10/27/2025 **Merged by:** [@bctiemann](https://github.com/bctiemann) **Base:** `main` ← **Head:** `20389-allow-all-bulk-rename` --- ### 📝 Commits (1) - [`ac7a4ec`](https://github.com/netbox-community/netbox/commit/ac7a4ec4a39f24df8adb356e03f39092c7165a0a) feat(views): Add FilterSet support to BulkRenameView ### 📊 Changes **12 files changed** (+139 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/views.py` (+8 -0) 📝 `netbox/core/views.py` (+1 -0) 📝 `netbox/dcim/tests/test_views.py` (+37 -0) 📝 `netbox/dcim/views.py` (+29 -0) 📝 `netbox/extras/views.py` (+13 -0) 📝 `netbox/ipam/views.py` (+13 -0) 📝 `netbox/netbox/views/generic/bulk_views.py` (+13 -4) 📝 `netbox/tenancy/views.py` (+5 -0) 📝 `netbox/users/views.py` (+3 -0) 📝 `netbox/virtualization/views.py` (+6 -0) 📝 `netbox/vpn/views.py` (+8 -0) 📝 `netbox/wireless/views.py` (+3 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #20389 **Summary** Make `BulkRenameView` honor **“Select all N matching query”**, aligning behavior with `BulkEditView`/`BulkDeleteView`. **What changed** - `BulkRenameView` now accepts a `filterset`. - When `_all`/`select_all` is posted, the target queryset is derived via `filterset(request.GET, self.get_queryset(request))`; otherwise it uses the posted `pk[]`. - Add a test confirming selection (37 interfaces) is fully renamed. **Impact** No UI or API changes; bulk actions now behave consistently across edit/delete/rename. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:25:16 +01:00
adam closed this issue 2025-12-30 00:25:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#16005