-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fixes #37396 - Fix autocomplete for ArfReports #567
Conversation
The code expected that a host would have up to one lifecycle environment, which doesn't hold anymore on recent versions of katello. This tripped up scoped_search which couldn't find the right association to search on.
Thanks, @adamruzicka and @pondrejk ! Although, it fixes the initial issues, I guess we still might have problem that search by lifecycle env won't work: This can be also problem on my machine, but if you can reproduce it, do we want to fix that as part of this PR or should we deal with that later? |
We have to elaborate a bit on the associations to make scoped_search be able to put the search together through the entire chain of the associations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @adamruzicka, I was able to search by LCE.
has_one :content_facet, :through => :host | ||
has_many :content_view_environment_content_facets, through: :content_facet, class_name: 'Katello::ContentViewEnvironmentContentFacet' | ||
has_many :content_view_environments, through: :content_view_environment_content_facets | ||
has_many :content_views, through: :content_view_environments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought you'll fix that in the way it's done for the other searches through ext_method
, but that's seems fine as well :)
* Fixes #37396 - Fix autocomplete for ArfReports The code expected that a host would have up to one lifecycle environment, which doesn't hold anymore on recent versions of katello. This tripped up scoped_search which couldn't find the right association to search on. * Fixes #37396 - Fix search on lifecycle_environments We have to elaborate a bit on the associations to make scoped_search be able to put the search together through the entire chain of the associations. (cherry picked from commit 868769f)
The code expected that a host would have up to one lifecycle environment, which doesn't hold anymore on recent versions of katello. This tripped up scoped_search which couldn't find the right association to search on.