Bug 1743188

Summary: Error after applying filter in Services: operator 'token' is not supported
Product: Red Hat CloudForms Management Engine Reporter: Hilda Stastna <hstastna>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED DUPLICATE QA Contact: Angelina Vasileva <anikifor>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.11.0CC: bmidwood, hkataria, lavenel, mpovolny, mshriver, obarenbo, yrudman
Target Milestone: GA   
Target Release: 5.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 13:54:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Hilda Stastna 2019-08-19 09:50:37 UTC
Description of problem:
It is not possible to apply filter in Advanced Search in My Services after saving the filter.

Version-Release number of selected component (if applicable):
5.11.0.19.20190813184334_ed72c9f
5.10.8.0.20190729222758_e725e22

How reproducible:
100%

Steps to Reproduce:
1. Go to Services > My Services
2. Open Advanced Search and create some expression, commit it
3. Save the filter: click on Save, then name the filter,
   click on Save button again (and don't close Advanced search)
4. Click on Apply button 

Actual results:
Infinite spinner and error:

[----] I, [2019-08-19T11:37:25.781722 #8607:2af522aaa644]  INFO -- : Started POST "/service/report_data" for ::1 at 2019-08-19 11:37:25 +0200
[----] I, [2019-08-19T11:37:25.841231 #8607:2af522aaa644]  INFO -- : Processing by ServiceController#report_data as HTML
[----] I, [2019-08-19T11:37:25.841578 #8607:2af522aaa644]  INFO -- :   Parameters: {"model_name"=>"Service", "model"=>"Service", "active_tree"=>"svcs_tree", "explorer"=>true, "additional_options"=>{"named_scope"=>nil, "gtl_dbname"=>nil, "model"=>"Service", "match_via_descendants"=>nil, "parent_id"=>nil, "parent_class_name"=>nil, "parent_method"=>nil, "association"=>nil, "view_suffix"=>nil, "row_button"=>nil, "menu_click"=>nil, "sb_controller"=>nil, "embedded"=>nil, "showlinks"=>nil, "policy_sim"=>nil, "in_a_form"=>nil, "lastaction"=>"show_list", "display"=>nil, "gtl_type"=>"grid", "supported_features_filter"=>nil, "clickable"=>nil, "no_checkboxes"=>nil, "report_name"=>nil, "custom_action"=>nil}, "service"=>{}}
[----] F, [2019-08-19T11:37:25.872722 #8607:2af522aaa644] FATAL -- : Error caught: [RuntimeError] operator 'token' is not supported
/home/hstastna/manageiq/manageiq/lib/miq_expression.rb:1437:in `to_arel'
/home/hstastna/manageiq/manageiq/lib/miq_expression.rb:289:in `to_sql'
/home/hstastna/manageiq/manageiq/lib/rbac/filterer.rb:257:in `search'
/home/hstastna/manageiq/manageiq/lib/rbac/filterer.rb:146:in `search'
/home/hstastna/manageiq/manageiq/lib/rbac.rb:3:in `search'
/home/hstastna/manageiq/manageiq/app/models/miq_report/search.rb:117:in `paged_view_search'
/home/hstastna/manageiq/manageiq-ui-classic/app/controllers/application_controller.rb:1325:in `get_view'
/home/hstastna/manageiq/manageiq-ui-classic/app/controllers/application_controller.rb:422:in `report_data'

Expected results:
We should be able to apply the filter, no errors.

Additional info: