Bug 1664886

Summary: Bootstrap select for "CONTAINS" in Expression or Scope "Tag" 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: ux
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 22:24:05 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 "Tag" and then choose an item from the Bootstrap Select dropdown after "CONTAINS", a loading screen will appear twice before the change is completed. This bug only occurs with the element "Tag" is selected.

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 "Tag"
5. Change "<Choose>" to e.g. "Host/Node.My Company Tags: Cost Center"
6. After CONTAINS, change "<Choose>" to e.g. "Cost Center 001"

Actual results:
A loading screen appears twice before the user can add the expression.

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 and https://bugzilla.redhat.com/show_bug.cgi?id=1664852, only this bug only appears when "Tag" is selected.

This seems to be a larger issue with Bootstrap Select. Per, BZ 1649057, this issue been fixed in 5.10, but only for the Expressions with the element "Field"

Comment 3 Greg Piatigorski 2019-02-13 22:59:18 UTC
Similar issue has been reported in this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1664886

Code fix applies to both BZ tickets.

Comment 5 John Dupuy 2019-04-29 14:59:44 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 "Tag"
5. Change "<Choose>" to e.g. "Host/Node.My Company Tags: Cost Center"
6. After CONTAINS, change "<Choose>" to e.g. "Cost Center 001"
7. Verified that only one loading screen/spinner appears

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