[PR #19795] [MERGED] Closes #19231: Add bulk renaming support for all models #15719

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19795
Author: @jeremystretch
Created: 6/30/2025
Status: Merged
Merged: 7/2/2025
Merged by: @jnovinger

Base: featureHead: 19231-bulk-renaming


📝 Commits (7)

  • 8f7d416 Closes #19231: Add bulk renaming support for all models
  • 5012768 Introduce a template filter for getattr()
  • 5e54115 Extend BulkRenameView to support arbitrary field names
  • 1333b96 Address bulk renaming support for remaining models
  • 2927b8d Bulk rename URL resolution should fail silently
  • b30a251 Update documentation
  • 0199c55 Fix bulk button rendering for HTMX requests

📊 Changes

18 files changed (+465 additions, -46 deletions)

View changed files

📝 docs/plugins/development/views.md (+5 -0)
📝 netbox/circuits/views.py (+46 -0)
📝 netbox/core/views.py (+5 -0)
📝 netbox/dcim/views.py (+108 -16)
📝 netbox/extras/views.py (+64 -4)
📝 netbox/ipam/views.py (+70 -0)
📝 netbox/netbox/object_actions.py (+5 -1)
📝 netbox/netbox/views/generic/bulk_views.py (+12 -8)
📝 netbox/netbox/views/generic/object_views.py (+2 -2)
📝 netbox/templates/generic/bulk_rename.html (+6 -4)
📝 netbox/templates/htmx/table.html (+1 -6)
📝 netbox/tenancy/views.py (+25 -0)
📝 netbox/users/views.py (+19 -0)
📝 netbox/utilities/templates/buttons/bulk_rename.html (+5 -3)
📝 netbox/utilities/templatetags/builtins/filters.py (+9 -0)
📝 netbox/virtualization/views.py (+24 -2)
📝 netbox/vpn/views.py (+42 -0)
📝 netbox/wireless/views.py (+17 -0)

📄 Description

Closes: #19231

  • Introduce the getattr template filter (needed for the bulk rename template)
  • Add BulkRename to the default set of actions on ObjectListView
  • Introduce a subclass of BulkRenameView for all relevant models; disable bulk renaming for others
  • Officially support BulkRenameView for plugins
  • Update ObjectAction URL resolution to fail silently

🔄 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/19795 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 6/30/2025 **Status:** ✅ Merged **Merged:** 7/2/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `feature` ← **Head:** `19231-bulk-renaming` --- ### 📝 Commits (7) - [`8f7d416`](https://github.com/netbox-community/netbox/commit/8f7d416aa5742c2d769f4b137c06b3709977a9bc) Closes #19231: Add bulk renaming support for all models - [`5012768`](https://github.com/netbox-community/netbox/commit/501276817ec6014301af6e15f2ce1d8a748fd1b4) Introduce a template filter for getattr() - [`5e54115`](https://github.com/netbox-community/netbox/commit/5e54115d956f669ece369a2eabfb47ab4f1b1cef) Extend BulkRenameView to support arbitrary field names - [`1333b96`](https://github.com/netbox-community/netbox/commit/1333b964d9a09b942e333871a2e501afe7c5f641) Address bulk renaming support for remaining models - [`2927b8d`](https://github.com/netbox-community/netbox/commit/2927b8dae176d747ef09ae5eb7f3c4d0c3fe8759) Bulk rename URL resolution should fail silently - [`b30a251`](https://github.com/netbox-community/netbox/commit/b30a251069c795a935cc5b744ff8671c2c511292) Update documentation - [`0199c55`](https://github.com/netbox-community/netbox/commit/0199c55a526a5308a55de4a1d457cc057c0eb863) Fix bulk button rendering for HTMX requests ### 📊 Changes **18 files changed** (+465 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `docs/plugins/development/views.md` (+5 -0) 📝 `netbox/circuits/views.py` (+46 -0) 📝 `netbox/core/views.py` (+5 -0) 📝 `netbox/dcim/views.py` (+108 -16) 📝 `netbox/extras/views.py` (+64 -4) 📝 `netbox/ipam/views.py` (+70 -0) 📝 `netbox/netbox/object_actions.py` (+5 -1) 📝 `netbox/netbox/views/generic/bulk_views.py` (+12 -8) 📝 `netbox/netbox/views/generic/object_views.py` (+2 -2) 📝 `netbox/templates/generic/bulk_rename.html` (+6 -4) 📝 `netbox/templates/htmx/table.html` (+1 -6) 📝 `netbox/tenancy/views.py` (+25 -0) 📝 `netbox/users/views.py` (+19 -0) 📝 `netbox/utilities/templates/buttons/bulk_rename.html` (+5 -3) 📝 `netbox/utilities/templatetags/builtins/filters.py` (+9 -0) 📝 `netbox/virtualization/views.py` (+24 -2) 📝 `netbox/vpn/views.py` (+42 -0) 📝 `netbox/wireless/views.py` (+17 -0) </details> ### 📄 Description ### Closes: #19231 - Introduce the `getattr` template filter (needed for the bulk rename template) - Add `BulkRename` to the default set of actions on `ObjectListView` - Introduce a subclass of `BulkRenameView` for all relevant models; disable bulk renaming for others - Officially support BulkRenameView for plugins - Update ObjectAction URL resolution to fail silently --- <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:23:37 +01:00
adam closed this issue 2025-12-30 00:23:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15719