Skip to content
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

Merged
merged 2 commits into from
May 15, 2024

Conversation

adamruzicka
Copy link
Contributor

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.

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.
@pondrejk
Copy link

checked on patched stream from the functional side, before:

Screenshot from 2024-04-30 15-00-59

after:

Screenshot from 2024-04-30 15-18-11

@ofedoren
Copy link
Member

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:
ScreenShot-1715684340333

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.
Copy link
Member

@ofedoren ofedoren left a 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.

Comment on lines +112 to +115
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
Copy link
Member

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 :)

@ofedoren ofedoren merged commit 868769f into theforeman:master May 15, 2024
24 of 26 checks passed
ofedoren pushed a commit that referenced this pull request May 15, 2024
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants