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

Cannot Sort By asn_count Column For Sites Table And Providers View Table #18594

Open
mr1716 opened this issue Feb 7, 2025 · 5 comments · May be fixed by #18634
Open

Cannot Sort By asn_count Column For Sites Table And Providers View Table #18594

mr1716 opened this issue Feb 7, 2025 · 5 comments · May be fixed by #18634
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@mr1716
Copy link
Contributor

mr1716 commented Feb 7, 2025

Deployment Type

Self-hosted

NetBox Version

V4.2.0

Python Version

3.10

Steps to Reproduce

  1. Add the ‘ASN Count’ Column as an available/default column for the Sites table
  2. Click the ‘ASN Count’ column to sort the table by ASN Count
  3. Refresh the page

When doing this, I get the error:
`<class 'django.core.exceptions.FieldError'>

Cannot resolve keyword 'count' into field. Choices are: asn, bookmarks, comments, created, custom_field_data, description, device_count, id, journal_entries, last_updated, providers, rir, rir_id, sites, subscriptions, tagged_items, tags, tenant, tenant_id
`

Expected Behavior

It would sort the table based upon ASN Count value

Observed Behavior

It fails and can’t load the Sites Table. I also tested and verified this is an issue that occurs with the online demo system (demo.netbox.dev), so it isnt a customization or something special with my setup that is causing this.

@mr1716 mr1716 added status: needs triage This issue is awaiting triage by a maintainer type: bug A confirmed report of unexpected behavior in the application labels Feb 7, 2025
@mr1716 mr1716 changed the title Cannot Sort By asn_count Column For Sites Table Cannot Sort By asn_count Column For Sites Table — Broken Feb 7, 2025
@jeremystretch jeremystretch changed the title Cannot Sort By asn_count Column For Sites Table — Broken Cannot Sort By asn_count Column For Sites Table Feb 7, 2025
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available and removed status: needs triage This issue is awaiting triage by a maintainer labels Feb 7, 2025
jnovinger added a commit to jnovinger/netbox that referenced this issue Feb 11, 2025
@jnovinger
Copy link
Contributor

@arthanson , this is the one I'm working on.

@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Feb 12, 2025
@jnovinger jnovinger linked a pull request Feb 12, 2025 that will close this issue
@jnovinger jnovinger added the status: accepted This issue has been accepted for implementation label Feb 13, 2025 — with Linear
@bctiemann
Copy link
Contributor

@jnovinger This fix also needs to be applied to ProviderListView, as it has the same issue.

@mr1716
Copy link
Contributor Author

mr1716 commented Feb 14, 2025

@bctiemann, would it worth submitting a separate ticket or keeping this one open? Just asking so it can be scoped properly

@jeremystretch
Copy link
Member

Let's fix that issue here as well, since these are both effectively the same bug.

@mr1716
Copy link
Contributor Author

mr1716 commented Feb 18, 2025

@jeremystretch that works. Will need to change the title then too to reflect it. It makes sense.

@mr1716 mr1716 changed the title Cannot Sort By asn_count Column For Sites Table Cannot Sort By asn_count Column For Sites Table And Providers View Table Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants