Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm which Inventory Item(s) will be deleted when deleting associated Component(s) #15665

Closed
chadhpaine opened this issue Apr 8, 2024 · 6 comments
Labels
status: revisions needed This issue requires additional information to be actionable type: feature Introduction of new functionality to the application

Comments

@chadhpaine
Copy link

chadhpaine commented Apr 8, 2024

NetBox version

v3.7.4

Feature type

New functionality

Proposed functionality

When deleting an Interface, Power Port, or other Device Component tied to an Inventory Item by a Component Association (#7846), the Inventory Item is also deleted (#15586). Netbox does not currently warn of the pending deletion of those Inventory Items from the bulk-deletion menu, but it would be great if it did.

Use case

Inventory Items have the ability to carry serial-numbers (doc) which, being unique to the inventory, may not be duplicated or annotated in any other location within Netbox; and which, thanks to the ability to move inventory-items between devices (#3818), could be tracked as first-class metadata within Netbox: like child-devices (but unlike modules (#15289)), inventory-items don't have to be deleted and recreated to reassociate with other objects, implying that the serial-number field can be treated as persistent, and that Netbox could be used for the long-term tracking of retained inventory-serials.

In that deletion of inventory-items associated to other components, when those associated components are deleted, is an intended operation (#15586), this issue requests implementation of a warning on deletion of those components that the inventory-items to which they relate will also be deleted, from all contexts from which they could be deleted. In lieu of support enabling the aggregation of inventory-item relationships as columns across all component-types (#14653), this change would at least provide a 'one-last-chance' to the instance-maintainer to identify the associated inventory, and to take the actions appropriate to retain it if relevant, before continuing with deletion of the targeted components.

While it has been shown [1] that the atomic-deletion mechanism for components other than inventory-items do in-fact show the inventory-items that will be deleted when the component is deleted, the bulk-deletion menu does not provide such insight at this time [2].

Database changes

n/a

External dependencies

n/a

@chadhpaine chadhpaine added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Apr 8, 2024
@jeffgdotorg
Copy link
Collaborator

Thanks for your interest in improving NetBox, and especially for the detailed and nicely cited issue body.

I'm moving this issue along to needs owner. If you are interested in working it through to a PR, please let us know and a maintainer will assign the issue to you. Otherwise another developer with the requisite skills and working capacity can pick it up by commenting with an expression of interest.

@jeffgdotorg jeffgdotorg added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: needs triage This issue is awaiting triage by a maintainer labels Apr 10, 2024
@jeffgdotorg jeffgdotorg removed their assignment Apr 10, 2024
@jeremystretch
Copy link
Member

When deleting an Interface, Power Port, or other Device Component tied to an Inventory Item by a Component Association (#7846), the Inventory Item is also deleted (#15586). Netbox does not currently warn of the pending deletion of those Inventory Items, but it would be great if it did.

NetBox v3.7.5 shows the following warning when deleting an interface with an inventory item associated with it:

screenshot

@chadhpaine what specifically are you proposing be implemented?

@jeremystretch jeremystretch added status: revisions needed This issue requires additional information to be actionable and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Apr 19, 2024
@chadhpaine
Copy link
Author

chadhpaine commented Apr 19, 2024

@jeremystretch I hadn't observed that screen before, but this is exactly what I was looking for. When I mentioned deleting the interface, I may have used the bulk-deletion feature (select the checkbox for the interface from the list, then click Delete Selected), which is where I noticed the lack of warning, rather than atomic-component-deletion, which does indeed pull-up the view you screen-grabbed.

Cloning your setup, note the lack of mention of MyItem1234.
image

Updated the issue-description per these findings.

@arthanson
Copy link
Collaborator

@chadhpaine can you please rework this as a general feature request to for bulk-delete to show dependent objects? This doesn't just effect inventory-items, dependent objects are not shown in any bulk operations. See #14488 which was brought up before but never turned into a feature request.

@chadhpaine
Copy link
Author

@arthanson per your request, I created #16191; since that issue encompasses this request, feel free to close this as subordinate.

@arthanson
Copy link
Collaborator

closing as replaced by a feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: revisions needed This issue requires additional information to be actionable type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

4 participants