Project

General

Profile

Bug #9167

Incorrect data being returned when calling APIs that use chained joins and scoped search

Added by Eric Helms about 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
medium
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Associated revisions

Revision 25dda4c9 (diff)
Added by Eric Helms about 8 years ago

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.

Revision d8649755
Added by Eric Helms about 8 years ago

Merge pull request #4965 from ehelms/fixes-9167

Fixes #9167: Fix chained scopes when using scoped_search in API

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

#4 Updated by Eric Helms about 8 years ago

  • Legacy Backlogs Release (now unused) changed from 14 to 23

Also available in: Atom PDF