Nested inventory items are not displayed correctly #4992

Closed
opened 2025-12-29 19:22:57 +01:00 by adam · 1 comment
Owner

Originally created by @kr3ator on GitHub (Jun 10, 2021).

Originally assigned to: @jeremystretch on GitHub.

NetBox version

v2.11.3

Python version

3.8

Steps to Reproduce

  1. Add an inventory item, e.g. server0
  2. Create some more child elements to the previous element, e.g. cpu, ram, slot0, slot1
  3. Created new inventory items (item0, item1) for each of slot0 and slot1

Expected Behavior

Invetory view should display all inventory items sorted alphabetically starting from the top most item to the last child element adding correct indentation.

server0
-cpu
-ram
-slot0
--item0
--item1
-slot1
--item0
--item1

Observed Behavior

All items have correct indentation level but they are sorted alphabetically regardless of the structure

-cpu
--item0
--item0
--item1
--item1
-ram
server0
-slot0
-slot1

Originally created by @kr3ator on GitHub (Jun 10, 2021). Originally assigned to: @jeremystretch on GitHub. ### NetBox version v2.11.3 ### Python version 3.8 ### Steps to Reproduce 1. Add an inventory item, e.g. server0 2. Create some more child elements to the previous element, e.g. cpu, ram, slot0, slot1 3. Created new inventory items (item0, item1) for each of slot0 and slot1 ### Expected Behavior Invetory view should display all inventory items sorted alphabetically starting from the top most item to the last child element adding correct indentation. server0 -cpu -ram -slot0 --item0 --item1 -slot1 --item0 --item1 ### Observed Behavior All items have correct indentation level but they are sorted alphabetically regardless of the structure -cpu --item0 --item0 --item1 --item1 -ram server0 -slot0 -slot1
adam added the type: bugstatus: accepted labels 2025-12-29 19:22:57 +01:00
adam closed this issue 2025-12-29 19:22:57 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 10, 2021):

Looks like we were inadvertently overwriting MPTT's ordering logic in the table. Easy fix. Thanks for the heads up!

@jeremystretch commented on GitHub (Jun 10, 2021): Looks like we were inadvertently overwriting MPTT's ordering logic in the table. Easy fix. Thanks for the heads up!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4992