[PR #14089] [MERGED] Closes #13690: List all objects to be deleted #14311

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/14089
Author: @ITJamie
Created: 10/20/2023
Status: Merged
Merged: 11/1/2023
Merged by: @jeremystretch

Base: featureHead: list_all_objects_to_be_deleted


📝 Commits (10+)

  • b81d462 show objects that would be deleted by cascade
  • 1063db9 some items were not showing (eg ips on devices)
  • 298a786 dont include the item being deleted in the list of related items
  • 7c3caf5 Revert "dont include the item being deleted in the list of related items"
  • 63b1736 cleanup
  • 48d7ca7 requested adjustments
  • 4138249 remove comma from end of list
  • cdae6c2 linting
  • 6be745f refactor, add accordion
  • ee5be84 migrate to defaultdict, use title for capitalisation of accordian titles

📊 Changes

2 files changed (+61 additions, -1 deletions)

View changed files

📝 netbox/netbox/views/generic/object_views.py (+27 -1)
📝 netbox/templates/htmx/delete_form.html (+34 -0)

📄 Description

Fixes: #13690

List all objects to be deleted when deleting an item.

Currently, the list includes the original item being deleted. we can change that pretty easily but I would like feedback first as to whether the list should be exhaustive or just the additional items (see #13842 as to why including the original item in the list might make sense)

Screenshot 2023-10-20 at 07 52 22 Screenshot 2023-10-20 at 07 53 26

🔄 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/14089 **Author:** [@ITJamie](https://github.com/ITJamie) **Created:** 10/20/2023 **Status:** ✅ Merged **Merged:** 11/1/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `list_all_objects_to_be_deleted` --- ### 📝 Commits (10+) - [`b81d462`](https://github.com/netbox-community/netbox/commit/b81d4629769e18dd1e27a29ae615e9a0a54fbb99) show objects that would be deleted by cascade - [`1063db9`](https://github.com/netbox-community/netbox/commit/1063db94701c10fe36e4264e26f8f8b3479c2119) some items were not showing (eg ips on devices) - [`298a786`](https://github.com/netbox-community/netbox/commit/298a7860b20c2fd90e887c66c4f196460097e71e) dont include the item being deleted in the list of related items - [`7c3caf5`](https://github.com/netbox-community/netbox/commit/7c3caf5e392d7c711b1de684a8edf1988eb716c0) Revert "dont include the item being deleted in the list of related items" - [`63b1736`](https://github.com/netbox-community/netbox/commit/63b1736c97ff6c1fc2a26d2cb9c1e459d41a341a) cleanup - [`48d7ca7`](https://github.com/netbox-community/netbox/commit/48d7ca7a64af881f557ac0e674b0b206ac8391d2) requested adjustments - [`4138249`](https://github.com/netbox-community/netbox/commit/413824934c12cacd2ac839f5ac987f7d2035984e) remove comma from end of list - [`cdae6c2`](https://github.com/netbox-community/netbox/commit/cdae6c2d94147e5b4488772cba79db9d03e000c3) linting - [`6be745f`](https://github.com/netbox-community/netbox/commit/6be745f13cd5004d40aed03121bf401f4e1d5c86) refactor, add accordion - [`ee5be84`](https://github.com/netbox-community/netbox/commit/ee5be84911d5feb4d7860154d649c89ffe71c355) migrate to defaultdict, use title for capitalisation of accordian titles ### 📊 Changes **2 files changed** (+61 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/netbox/views/generic/object_views.py` (+27 -1) 📝 `netbox/templates/htmx/delete_form.html` (+34 -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: #13690 List all objects to be deleted when deleting an item. Currently, the list includes the original item being deleted. we can change that pretty easily but I would like feedback first as to whether the list should be exhaustive or just the additional items (see #13842 as to why including the original item in the list might make sense) <img width="1318" alt="Screenshot 2023-10-20 at 07 52 22" src="https://github.com/netbox-community/netbox/assets/1613241/10e311c4-09ef-4cba-8082-fc9069d0cdbc"> <img width="1531" alt="Screenshot 2023-10-20 at 07 53 26" src="https://github.com/netbox-community/netbox/assets/1613241/a9f89239-876f-4ab5-bd63-aa4f3c984561"> --- <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-29 23:23:44 +01:00
adam closed this issue 2025-12-29 23:23:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14311