Natural ordering of device components broken #2568

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

Originally created by @jeremystretch on GitHub (Apr 30, 2019).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5.11

Steps to Reproduce

  1. Create a device with 48 power outlets named A[A-C][1-16] (48 total)
  2. View the device

Expected Behavior

The outlets should be listed in natural order (AA1, AA2, ... AA12, AB1, ...).

Observed Behavior

The outlets are listed in an apparently random order. This was caused by the replacement of DeviceComponentManager with NaturalOrderingManager in #2986. The root issue is that device components such as PowerOutlet do not specify Meta.ordering on the model and thus are not being ordered.

Originally created by @jeremystretch on GitHub (Apr 30, 2019). ### Environment * Python version: 3.5.2 * NetBox version: 2.5.11 ### Steps to Reproduce 1. Create a device with 48 power outlets named `A[A-C][1-16]` (48 total) 2. View the device ### Expected Behavior The outlets should be listed in natural order (AA1, AA2, ... AA12, AB1, ...). ### Observed Behavior The outlets are listed in an apparently random order. This was caused by the replacement of DeviceComponentManager with NaturalOrderingManager in #2986. The root issue is that device components such as PowerOutlet do not specify `Meta.ordering` on the model and thus are not being ordered.
adam added the type: bugstatus: accepted labels 2025-12-29 18:20:01 +01:00
adam closed this issue 2025-12-29 18:20:01 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2568