Skip to content

Conversation

@perryr16
Copy link
Contributor

@perryr16 perryr16 commented Nov 21, 2025

Any background context you want to provide?

Sorting has previously been disabled for related columns on the inventory list ui-grid

What's this PR do?

_parse_view_sort / build_view_filters_and_sorts now recognize columns that live on the related inventory (tax-lot fields on the property grid, or vice versa). When you sort on one of those columns, we build a per-record value from the related join and hand it back to the queryset, so the backend actually honors the sort order instead of ignoring it. For string-y related fields we run the value through the same “natural sort” treatment as first-party columns, which keeps mixed numeric strings in human order (1, 2, 10 instead of 1, 10, 2).

Added tests

How should this be manually tested?

Upload taxlots and properties, sort on related fields

What are the relevant tickets?

#5088

Screenshots (if appropriate)

@perryr16 perryr16 added the Feature Add this label to new features. This will be reflected in the change log when generated. label Nov 21, 2025
@perryr16 perryr16 changed the title sort on related col Sort on related columns from inventory list Nov 24, 2025
@perryr16
Copy link
Contributor Author

The failing test should be addressed by PR #5146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Add this label to new features. This will be reflected in the change log when generated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants