-
Notifications
You must be signed in to change notification settings - Fork 983
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 #2263 search Hostgroup by label #438
fixes #2263 search Hostgroup by label #438
Conversation
can you please add tests? |
@ohadlevy re-committed with tests |
@isratrade the tests fail, can you have a look please? |
@ohadlevy the tests pass for Ruby 1.9.2 and 1.9.3, but fail for 1.8.7 on the STI Host method missing. @GregSutcliffe Any suggestion how to proceed?
|
You're not in the automated testing whitelist. Please contact us at #theforeman-dev to have this pull request manually reviewed and tested. |
Test Results: FAILURE (http://ci.theforeman.org/job/test_develop_pull_request/56/) |
if name_changed? || ancestry_changed? | ||
Hostgroup.where("ancestry IS NOT NULL").each do |hostgroup| | ||
if hostgroup.path_ids.include?(self.id) | ||
lbl = hostgroup.ancestors.map{|a| a.name + "/"}.join + hostgroup.name |
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.
shouldnt we use hostgroup.get_label instead?
can you rebase as well? thanks |
[test] |
@ohadlevy rebased |
@isratrade can you have a look at the test failures? |
@ohadlevy , it passed on postgres and failed on mysql and sqlite for a destroy action ???? |
@ohadlevy, error msg is I'm guessing my recent commit will pass the tests on mysql and sqlite. If so, I will squash the 2 commits. |
@domcleal I'm stumped at the failure on MySql and Sqlite. Can you confirm that this test databases are migrated. |
@isratrade i think its a simple has_many :hosts which is wrong on the hostgroup... probably leftover from the hosts STI migration? |
@skottler @domcleal, http://ci.theforeman.org/job/test_develop_pull_request/258/ shows red on Ruby 1.9.2 and sqlite3, but it doesn't give the details of any failed tests??? |
@isratrade Looks like a network failure for rubygems.org:
|
Yeah, it was probably just a transient AWS network issue. I'm fine with going ahead with the merge without a retest since the cause was fairly obvious and it only happened on one platform. |
@isratrade yeah, CI's down at the moment, investigating. |
Could we add hostgroup search (by label) to the Reports model? It's rather useful and doing this without the label column is just a mess. |
@elobato sure, I can add this next week in a separate pull request |
merged - thanks! |
Clean up upstart export to use native upstart features
Fixes #23793 - Port robottelo tests for settings
timeout alone is deprecated in Ruby 2.3 Closes theforemanGH-438
@abenari, @ohadlevy
I made the search param by label. However, the UI column header is "name". Do you suggest to change the column to "label" or change the scoped_search on "name" to look at "label" column?