Bug #9167
Incorrect data being returned when calling APIs that use chained joins and scoped search
Associated revisions
History
#1
Updated by Eric Helms about 8 years ago
Test Scenario:
1. Sync 2 repositories with different sets of errata.
2. Hit /katello/api/v2/errata?organization_id=1&repository_id=1 and note the errata presented and totals.
3. Now filter by environment /katello/api/v2/errata?organization_id=1&repository_id=1&environment=1 and you should notice that the errata set is ALL errata in the environment instead of only the errata from the first query.
#2
Updated by The Foreman Bot about 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/4965 added
- Pull request deleted (
)
#3
Updated by Eric Helms about 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|25dda4c9d05a9f386eda118035ad18ce87f7f6f1.
#4
Updated by Eric Helms about 8 years ago
- Legacy Backlogs Release (now unused) changed from 14 to 23
Fixes #9167: Fix chained scopes when using scoped_search in API
Scoped search claims to support being applied to a set of scopes via
scopes.search_for. However, when multiple joins are used within the 'scopes'
the last join wins in the prior format. To combat this, we apply the
search_for first, which is itself a scope, and merge the scopes into
that result.