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

Fix basic search for Datastores #4528

Merged

Conversation

hstastna
Copy link
Contributor

@hstastna hstastna commented Aug 23, 2018

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1615826

What:
There is a bug in Datastores screen: previous basic search is not erased for last selected filter (node in the tree) before applying another basic search. This happens because basic search text is saved for each node in the tree, not for actual explorer screen.

Details:
Code should remember search text/string per explorer, not for each node/filter selected in the tree. I tried the same steps to reproduce in other explorer screens and I was not able to reproduce the behavior. It seems to be working correctly in other screens, search string is only being remembered per explorer. The behavior implemented in Datastores screen is a bug. The right search string is always set by calling process_show_list method here https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/storage_controller/storage_d.rb#L27 or https://github.com/ManageIQ/manageiq-ui-classic/blob/master/app/controllers/storage_controller/storage_d.rb#L41, no need to implement anything else.

Note:
The fix in this PR works also in the Datastore screen displayed through other screens (provider's details page) and also if going away to some totally different screen and going back to Datastores screen.


Steps to reproduce:

  1. Go to Compute > Infra > Datastores (you need some Datastores there, of course)
  2. Try to search for some text using basic search
  3. Click on some node in the tree, apply some filter on datastores
  4. Click on some other filter in the tree
  5. Try to search for some another text using basic search
  6. Click on the filter applied as a first one, from step 3
    => basic search changed to the previous one!!!

Step 3 from steps to reproduce (Provisioning Scope/All global filter - the 1st applied one):
data1_before

Step 4 from steps to reproduce (Store Type/FCP global filter - the 2nd applied one):
data2_before

Before: (clicking on the filter applied as the 1st one)
data1_before_result

After:
data1_after_result

@hstastna
Copy link
Contributor Author

@miq-bot add_label bug, gaprindashvili/yes

@miq-bot
Copy link
Member

miq-bot commented Aug 23, 2018

Checked commit hstastna@5ed2ae7 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

@h-kataria h-kataria self-assigned this Aug 23, 2018
@h-kataria
Copy link
Contributor

verified fix.

@h-kataria h-kataria added this to the Sprint 93 Ending Aug 27, 2018 milestone Aug 23, 2018
@h-kataria h-kataria merged commit 126fbad into ManageIQ:master Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants