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

Custom Link Column Sort #13451

Closed
abahney opened this issue Aug 11, 2023 · 1 comment
Closed

Custom Link Column Sort #13451

abahney opened this issue Aug 11, 2023 · 1 comment
Assignees
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@abahney
Copy link

abahney commented Aug 11, 2023

NetBox version

v3.5.7

Python version

3.10

Steps to Reproduce

  1. Create custom link for Site that only applies to specific region
    Link Text:{% if object.region.slug =='us-ny' %} Test Link {% endif %}
    Link URL: https://www.google.com
  2. Add custom link as column in Site table
  3. Sort by custom link

Expected Behavior

Sort by those that have a custom link vs not.

Observed Behavior

Doesn't sort by custom link.
custom_link_sort

@abahney abahney added the type: bug A confirmed report of unexpected behavior in the application label Aug 11, 2023
@jeremystretch
Copy link
Member

Sort by those that have a custom link vs not.

Custom links are assigned per model, not per object. And we cannot order by rendered text. All we can really do is disable ordering for the column.

@jeremystretch jeremystretch self-assigned this Aug 14, 2023
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Aug 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2023
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