Bug 1664852

Summary: Bootstrap select for math symbol in Expression or Scope "Count of" causes a loading screen to display twice
Product: Red Hat CloudForms Management Engine Reporter: John Dupuy <jdupuy>
Component: UI - OPSAssignee: Greg Piatigorski <gpiatigo>
Status: CLOSED ERRATA QA Contact: John Dupuy <jdupuy>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.10.0CC: bmidwood, dmetzger, hkataria, lavenel, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:34:59 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description John Dupuy 2019-01-09 20:37:08 UTC
Description of problem:
When a user creates an expression or scope via UI, e.g. when creating an Alert or Condition, if they select the element "Count of" and then change from "=" to e.g. ">", a loading screen will appear twice before the change is completed. This bug only occurs when the element "Count of" is selected, and changing the math symbol when "Field" is selected does not produce this bug. 

The example below is with a condition expression but the bug appears to impact any expression or scope editor in cfme. 

Version-Release number of selected component (if applicable):
5.10.0.x and 5.9.7.x


How reproducible:
100%

Steps to Reproduce:
1. Navigate to Control->Explorer
2. Select Condition from the accordion 
3. Click "Host Conditions" -> "Add a new Host/Node condition"
4. Under "Expression" -> "Edit Selected Element" click "Count of"
5. Change "<Choose>" to e.g. "Host/Node.Compliance History"
6. Change "=" to e.g. ">"

Actual results:
A loading screen appears twice before the user can input a value in the input box.

Expected results:
A loading screen should appear only once. 

Additional info:
After the second loading screen, the user can create the expression like normal, however this impacts our automation and is causing test failures. This bug is similar to https://bugzilla.redhat.com/show_bug.cgi?id=1649057, only this bug only appears when "Count of" is selected.

Comment 4 CFME Bot 2019-02-18 14:46:58 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/e50cb9cdc229b97f92c938f42f9f738b266d8c4b
commit e50cb9cdc229b97f92c938f42f9f738b266d8c4b
Author:     Greg Piatigorski <gpiatigo>
AuthorDate: Wed Feb 13 17:48:00 2019 -0500
Commit:     Greg Piatigorski <gpiatigo>
CommitDate: Wed Feb 13 17:48:00 2019 -0500

    Fix Expression Builder to load page display only once per dropdown pick

    Ensure that Bootstrap SelectPicker is only invoked once when selecting from dropdowns

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

 app/views/layouts/exp_atom/_edit_tag.html.haml | 3 +-
 1 file changed, 1 insertion(+), 2 deletions(-)

Comment 5 John Dupuy 2019-04-29 14:58:19 UTC
Verified in CFME 5.11.0.1.20190424210327_58b5dbd

Steps of verification:
1. Navigate to Control->Explorer
2. Select Condition from the accordion 
3. Click "Host Conditions" -> "Add a new Host/Node condition"
4. Under "Expression" -> "Edit Selected Element" click "Count of"
5. Change "<Choose>" to e.g. "Host/Node.Compliance History"
6. Change "=" to e.g. ">"
7. Verified that only a single loading screen appeared.

Comment 7 errata-xmlrpc 2019-12-12 13:34:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:4199