-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Milestone
Description
Issue type
[X] Feature request
[ ] Bug report
[ ] Documentation
Environment
- Python version: 3.5.2
- NetBox version: 2.2.4
Description
The dcim_inventoryitem table has a "parent_id" field which is self-referential:
"dcim_inventoryitem_parent_id_7ebcd457_fk_dcim_inventoryitem_id" FOREIGN KEY (parent_id) REFERENCES dcim_inventoryitem(id) DEFERRABLE INITIALLY DEFERRED
and there is some support for rendering such items hierarchically:
{% for item in item.child_items.all %}
{% with template_name='dcim/inc/inventoryitem.html' indent=indent|add:20 %}
{% include template_name %}
{% endwith %}
{% endfor %}
But there is currently no way to set the inventory item parent/child relationship in the GUI.
Implementing this could be as simple as a 'set parent' drop-down list (restricted to inventory items on the current device); or it could change the data model to MPTT, like Region.
Metadata
Metadata
Assignees
Labels
status: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application