Skip to content

Conversation

@mikadamczyk
Copy link
Contributor

@mikadamczyk mikadamczyk commented Nov 20, 2025

🎫 Issue IBX-10494

Description:

  • Sorting uses the main location when needed and reuses an existing location join if it is already there. This keeps ordering stable even when the content has extra locations.
  • Sort builders now order by the same aliases they select (content id/published/name, section identifiers/names, location_* aliases), cutting ambiguity.
  • The filtering gateway runs the query directly with limit/offset; the old wrapper subquery was dropped as redundant.
  • Location criteria skip extra joins when location is already in the query, and section/content sort builders add clear aliases.
  • Tests now check location sorting with main vs. secondary locations and use getContentInfo()->getMainLocationId() everywhere.

For QA:

Documentation:

Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good but please evaluate @alongosz remark. I guess we don't have other way to distinguish queries apart from location alias? The current one looks a bit hacky but can go as-is I guess.

@mikadamczyk mikadamczyk changed the title Sort fix IBX-10494: Refactored location filtering logic Dec 3, 2025
@mikadamczyk mikadamczyk marked this pull request as ready for review December 9, 2025 09:41
@konradoboza konradoboza requested a review from alongosz December 9, 2025 13:58
@mikadamczyk mikadamczyk requested a review from alongosz December 11, 2025 12:20
@sonarqubecloud
Copy link

@mikadamczyk
Copy link
Contributor Author

Merged in #655

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants