[PR #17212] [MERGED] Fixes: #14044 - Allow regex renaming of unnamed devices #15026

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/17212
Author: @DanSheps
Created: 8/20/2024
Status: Merged
Merged: 12/9/2024
Merged by: @jeremystretch

Base: developHead: 14044-bulkrename-nameless-devices


📝 Commits (4)

📊 Changes

1 file changed (+5 additions, -2 deletions)

View changed files

📝 netbox/netbox/views/generic/bulk_views.py (+5 -2)

📄 Description

Fixes: #14044 - Allow regex renaming of unnamed devices

  • Allow regex renaming of unnamed devices (already allowed actually)
  • Catch errors relating to unnamed devices or integrity errors as a result of the rename process

Note: I removed the ^ requirement as, in my view, as long as there is a valid regex and the regex results in a unique set, we don't need to enforce the ^ requirement. For example: ^ or .* or . would all be equally as valid.

The main changes here catch both IntegrityError's from the DB and a validation error to ensure regex is used.


🔄 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/17212 **Author:** [@DanSheps](https://github.com/DanSheps) **Created:** 8/20/2024 **Status:** ✅ Merged **Merged:** 12/9/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `14044-bulkrename-nameless-devices` --- ### 📝 Commits (4) - [`75b0bea`](https://github.com/netbox-community/netbox/commit/75b0bea22b15adabe95d53f2af74653e46e4e752) Fixes: #14044 - Allow regex renaming of unnamed devices - [`ec3a7f3`](https://github.com/netbox-community/netbox/commit/ec3a7f3bcbd00969e76df588b999f41a29eef705) Move validation to ensure all renames are eligible - [`f5e1b5a`](https://github.com/netbox-community/netbox/commit/f5e1b5aec65b6c3d82f7eb229a68cb118bde8dfb) Update to treat null name an empty string - [`f7368bc`](https://github.com/netbox-community/netbox/commit/f7368bc15d1933002ba7740099523efe15c3c84a) Merge branch 'develop' of https://github.com/netbox-community/netbox into 14044-bulkrename-nameless-devices ### 📊 Changes **1 file changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/views/generic/bulk_views.py` (+5 -2) </details> ### 📄 Description ### Fixes: #14044 - Allow regex renaming of unnamed devices * Allow regex renaming of unnamed devices (already allowed actually) * Catch errors relating to unnamed devices or integrity errors as a result of the rename process Note: I removed the ^$ requirement as, in my view, as long as there is a valid regex and the regex results in a unique set, we don't need to enforce the ^$ requirement. For example: `^` or `.*` or `.` would all be equally as valid. The main changes here catch both IntegrityError's from the DB and a validation error to ensure regex is used. --- <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:19:32 +01:00
adam closed this issue 2025-12-30 00:19:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15026