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

Natural ordering breaks when sorting objects by name #2157

Closed
jeremystretch opened this issue Jun 11, 2018 · 3 comments
Closed

Natural ordering breaks when sorting objects by name #2157

jeremystretch opened this issue Jun 11, 2018 · 3 comments
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@jeremystretch
Copy link
Member

Issue type

[ ] Feature request
[x] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.3.4

Description

Natural ordering is broken in object tables. For example:

  1. Create three new sites named Foo1, Foo2, and Foo10.
  2. Navigate to the sites list. The three sites will be listed in order.
  3. Click the "Name" header to order sites by name.
  4. The sites are now ordered Foo1, Foo10, Foo2.

This occurs because the default natural ordering is being overridden by the specification of an explicit table field (e.g. name).

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Jun 11, 2018
jeremystretch added a commit that referenced this issue Jun 11, 2018
Fixes #2157: Natural ordering breaks when sorting objects by name
@deku-m
Copy link

deku-m commented Jun 12, 2018

It is also the same at the interface ordering at devices.
Ticket: #Interface numbering #2035

@jeremystretch
Copy link
Member Author

The interface sorting logic is similar but more niche and uses its own queryset manager.

@jeremystretch
Copy link
Member Author

Fixed by #2158 in develop-2.4

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants