Device/VM field not sortable in IP addresses table #9477

Closed
opened 2025-12-29 20:50:26 +01:00 by adam · 2 comments
Owner

Originally created by @joshuarestivo on GitHub (Apr 12, 2024).

Deployment Type

Self-hosted

NetBox Version

v3.5.7

Python Version

3.9

Steps to Reproduce

  1. Navigate to IPAM -> IP addresses
  2. Select 'Configure Table'
  3. Add the 'Device/VM' field to Selected Columns and Save
  4. Mouse over the 'Device/VM' header

Expected Behavior

'Device/VM' column header should be selectable as a sorting option like all others. Values should be sortable by this field.

Observed Behavior

'Device/VM' header is not linked as a sorting option. Values cannot be sorted by this field.

Originally created by @joshuarestivo on GitHub (Apr 12, 2024). ### Deployment Type Self-hosted ### NetBox Version v3.5.7 ### Python Version 3.9 ### Steps to Reproduce 1. Navigate to IPAM -> IP addresses 2. Select 'Configure Table' 3. Add the 'Device/VM' field to Selected Columns and Save 4. Mouse over the 'Device/VM' header ### Expected Behavior 'Device/VM' column header should be selectable as a sorting option like all others. Values should be sortable by this field. ### Observed Behavior 'Device/VM' header is not linked as a sorting option. Values cannot be sorted by this field.
adam closed this issue 2025-12-29 20:50:26 +01:00
Author
Owner

@mr1716 commented on GitHub (Apr 14, 2024):

That’s because the assigned_object_parent field in the code has the value orderable=False set. This means that the value cannot be sorted. One option could be to change the code to orderable=True or remove the orderable=False, line altogether

@mr1716 commented on GitHub (Apr 14, 2024): That’s because the assigned_object_parent field in the code has the value orderable=False set. This means that the value cannot be sorted. One option could be to change the code to orderable=True or remove the orderable=False, line altogether
Author
Owner

@arthanson commented on GitHub (Apr 15, 2024):

Thank you for opening a bug report. Unfortunately I don't think this is doable, assigned_object_parent is assigned_object__parent_object, where parent_object is a property on the model as it can be variable depending on the model referenced and is therefore not a database sortable field.

If you meant to open a feature request instead, please close this issue and open a new one using the feature request template.

@arthanson commented on GitHub (Apr 15, 2024): Thank you for opening a bug report. Unfortunately I don't think this is doable, assigned_object_parent is assigned_object__parent_object, where parent_object is a property on the model as it can be variable depending on the model referenced and is therefore not a database sortable field. If you meant to open a feature request instead, please close this issue and open a new one using the [feature request template](https://github.com/netbox-community/netbox/issues/new?template=feature_request.yaml).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9477