{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3745","repository_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3745/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3745/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3745/events","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3745","id":312950953,"number":3745,"title":"Fix Control explorer policies Search clear button","user":{"login":"hstastna","id":13417815,"avatar_url":"https://avatars0.githubusercontent.com/u/13417815?v=4","gravatar_id":"","url":"https://api.github.com/users/hstastna","html_url":"https://github.com/hstastna","followers_url":"https://api.github.com/users/hstastna/followers","following_url":"https://api.github.com/users/hstastna/following{/other_user}","gists_url":"https://api.github.com/users/hstastna/gists{/gist_id}","starred_url":"https://api.github.com/users/hstastna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hstastna/subscriptions","organizations_url":"https://api.github.com/users/hstastna/orgs","repos_url":"https://api.github.com/users/hstastna/repos","events_url":"https://api.github.com/users/hstastna/events{/privacy}","received_events_url":"https://api.github.com/users/hstastna/received_events","type":"User","site_admin":false},"labels":[{"id":505074429,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/bug","name":"bug","color":"ee0701","default":true},{"id":543836328,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/labels/expressions/filters","name":"expressions/filters","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars3.githubusercontent.com/u/51095?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpovolny","html_url":"https://github.com/martinpovolny","followers_url":"https://api.github.com/users/martinpovolny/followers","following_url":"https://api.github.com/users/martinpovolny/following{/other_user}","gists_url":"https://api.github.com/users/martinpovolny/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpovolny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpovolny/subscriptions","organizations_url":"https://api.github.com/users/martinpovolny/orgs","repos_url":"https://api.github.com/users/martinpovolny/repos","events_url":"https://api.github.com/users/martinpovolny/events{/privacy}","received_events_url":"https://api.github.com/users/martinpovolny/received_events","type":"User","site_admin":false},"assignees":[{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars3.githubusercontent.com/u/51095?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpovolny","html_url":"https://github.com/martinpovolny","followers_url":"https://api.github.com/users/martinpovolny/followers","following_url":"https://api.github.com/users/martinpovolny/following{/other_user}","gists_url":"https://api.github.com/users/martinpovolny/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpovolny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpovolny/subscriptions","organizations_url":"https://api.github.com/users/martinpovolny/orgs","repos_url":"https://api.github.com/users/martinpovolny/repos","events_url":"https://api.github.com/users/martinpovolny/events{/privacy}","received_events_url":"https://api.github.com/users/martinpovolny/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/milestones/39","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/milestone/39","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/milestones/39/labels","id":3255230,"number":39,"title":"Sprint 84 Ending Apr 23, 2018","description":"","creator":{"login":"martinpovolny","id":51095,"avatar_url":"https://avatars3.githubusercontent.com/u/51095?v=4","gravatar_id":"","url":"https://api.github.com/users/martinpovolny","html_url":"https://github.com/martinpovolny","followers_url":"https://api.github.com/users/martinpovolny/followers","following_url":"https://api.github.com/users/martinpovolny/following{/other_user}","gists_url":"https://api.github.com/users/martinpovolny/gists{/gist_id}","starred_url":"https://api.github.com/users/martinpovolny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinpovolny/subscriptions","organizations_url":"https://api.github.com/users/martinpovolny/orgs","repos_url":"https://api.github.com/users/martinpovolny/repos","events_url":"https://api.github.com/users/martinpovolny/events{/privacy}","received_events_url":"https://api.github.com/users/martinpovolny/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":41,"state":"open","created_at":"2018-04-10T09:08:59Z","updated_at":"2018-04-18T13:41:00Z","due_on":"2018-04-23T07:00:00Z","closed_at":null},"comments":5,"created_at":"2018-04-10T14:33:34Z","updated_at":"2018-04-18T13:41:56Z","closed_at":"2018-04-17T14:02:09Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/pulls/3745","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3745","diff_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3745.diff","patch_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3745.patch"},"body":"**Fixes:** https://bugzilla.redhat.com/show_bug.cgi?id=1563316\r\n\r\nFix Search clear button when searching text under _Control -> Explorer_ screens.\r\n\r\n---\r\n\r\nBefore searching text:\r\n![clear_search_after](https://user-images.githubusercontent.com/13417815/38563902-43a95ad6-3cde-11e8-9740-02f9387a8f1e.png)\r\n\r\n**Before:** (after clicking on clear search button, nothing has happened)\r\n![clear_search_before](https://user-images.githubusercontent.com/13417815/38564145-cf73d0f0-3cde-11e8-9968-5aacb6123bf1.png)\r\n\r\n**After:** (after clicking on clear search button, the same as before searching text)\r\n![clear_search_after](https://user-images.githubusercontent.com/13417815/38563902-43a95ad6-3cde-11e8-9740-02f9387a8f1e.png)\r\n\r\n**Details:**\r\nThe problem was that after `adv_search_text_clear` method (in application controller) was called, `@search_text` was reset to `nil` BUT then set again to the previous value. This was happening the next way: in `adv_search_text_clear`, `reload` method calls `tree_select` from miq policy controller, where because of calling `get_node_info` method `@search_text` was set again, in `set_search_text` method here: https://github.com/ManageIQ/manageiq-ui-classic/compare/master...hstastna:Control_explorer_policies_search_clear_button?expand=1#diff-81673877a9cc40eb5089aa4a42bd3764R915\r\nThe solution is to reset also `@sb[:pol_search_text][x_active_tree]`, not just `@search_text` or `@sb[:search_text]` as it is in `adv_search_text_clear` in app controller. This change is safe when changing accordions under  _Control -> Explorer_: it keeps search text in `@sb[:pol_search_text][x_active_tree]` as `x_active_tree` changes, until search text is cleared for appropriate tree/accordion."},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/comments/382390383","html_url":"https://github.com/ManageIQ/manageiq-ui-classic/pull/3745#issuecomment-382390383","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-classic/issues/3745","id":382390383,"user":{"login":"hstastna","id":13417815,"avatar_url":"https://avatars0.githubusercontent.com/u/13417815?v=4","gravatar_id":"","url":"https://api.github.com/users/hstastna","html_url":"https://github.com/hstastna","followers_url":"https://api.github.com/users/hstastna/followers","following_url":"https://api.github.com/users/hstastna/following{/other_user}","gists_url":"https://api.github.com/users/hstastna/gists{/gist_id}","starred_url":"https://api.github.com/users/hstastna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hstastna/subscriptions","organizations_url":"https://api.github.com/users/hstastna/orgs","repos_url":"https://api.github.com/users/hstastna/repos","events_url":"https://api.github.com/users/hstastna/events{/privacy}","received_events_url":"https://api.github.com/users/hstastna/received_events","type":"User","site_admin":false},"created_at":"2018-04-18T13:41:56Z","updated_at":"2018-04-18T13:41:56Z","author_association":"CONTRIBUTOR","body":"@miq-bot add_label gaprindashvili, yes"}}
{"actor":{"display_login":"hstastna"}}