Fix saving changes after editing Satellite Provider #3676
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing https://bugzilla.redhat.com/show_bug.cgi?id=1559422
Fix saving changes (name) after editing Satellite Provider and returning to All Configuration Manager Providers page, under Configuration > Management > Providers.
Steps to reproduce the problem:
Solution:
Added a simple condition to provider foreman controller to
load_or_clear_adv_search
method, as Providers' screens (under Config > Mgmt > Providers) don't support Advanced Search so it does not make sense to calllistnav_search_selected
method andclear_selected_search
method in it.clear_selected_search
method setssession[:adv_search]
which makes problems later inadv_search_build
method: it will go to the wrong part of the if/else block and then@edit[@expkey][:expression]
will not be properly set which will lead to error in https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/application_controller/advanced_search.rb#L37. This behavior is bad especially for root node there, other nodes can deal with it, so I am leaving the whole https://github.com/ManageIQ/manageiq-ui-classic/compare/master...hstastna:Edit_Save_All_Config_Manager_Providers?expand=1#diff-dd586a3167b910b76243edbecbbf0de5R97 there, not to break anything else, just added a simple condition. Saving,editing/displaying info of the provider tested also in other nodes, works well.Step 4 from steps to reproduce:
Before: (after clicking on Save button, nothing happens)
After: (successful saving the changes and returning to the appropriate page)