Skip to content

Commit

Permalink
Fix applying selected filter from Global/My Filters
Browse files Browse the repository at this point in the history
fixing https://bugzilla.redhat.com/show_bug.cgi?id=1429519

Fix applying selected filter from Global/My Filters
in accordion when clicking on the name of a filter
in Configuration -> Management -> Configured systems.
Fix disappearing of tree view when deleting loaded
filter in expression editor.
  • Loading branch information
Hilda Stastna committed May 11, 2017
1 parent 630644c commit a8f850f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/application_controller/filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def adv_search_build(model)
# Restore @edit hash if it's saved in @settings
@expkey = :expression # Reset to use default expression key
if session[:adv_search] && session[:adv_search][model.to_s]
@edit = copy_hash(session[:adv_search][model.to_s])
@edit = copy_hash(session[:edit])
# default search doesnt exist or if it is marked as hidden
if @edit && @edit[:expression] && !@edit[:expression][:selected].blank? &&
!MiqSearch.exists?(@edit[:expression][:selected][:id])
Expand Down
4 changes: 3 additions & 1 deletion app/controllers/provider_foreman_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def load_or_clear_adv_search
session[:edit] = @edit
@explorer = true

if x_active_tree != :configuration_manager_cs_filter_tree || x_node == "root"
if (x_active_tree != :configuration_manager_cs_filter_tree || x_node == "root") && params[:button] != 'saveit'
listnav_search_selected(0)
else
@nodetype, id = parse_nodetype_and_id(valid_active_node(x_node))
Expand All @@ -96,6 +96,8 @@ def load_or_clear_adv_search
self.x_node = params[:id]
quick_search_show
end
elsif x_active_tree == :configuration_manager_cs_filter_tree && params[:button] != 'saveit'
listnav_search_selected(id)
end
end
end
Expand Down

0 comments on commit a8f850f

Please sign in to comment.