Bug 1055525

Summary: Gadget web: IE10, IE11 - Response time gadget - the operations drop down does not refresh correctly
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Andrej Vano <avano>
Component: RT GovernanceAssignee: Eric Wittmann <eric.wittmann>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Sedlacek <jsedlace>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, dlesage, kconner, ncross, oskutka, sdorfiel, soa-p-jira
Target Milestone: CR2   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When browsing the RTGov user interface, the drop down menu that lists operations does not loading correctly. The menu does not refresh automatically. This results in a backlog of handlers being listed. To work around this, open gadget.xml and add the following line of code: "updateServiceDefinition": thesvc.off('change'); This will remove all change event handlers from the drop down menu.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrej Vano 2014-01-20 13:35:52 UTC
Description of problem:
When trying to change the existing filter on Service Response Time gadget - when you set a "service type", the operations drop down will not refresh automatically - therefore you can filter some impossible conditions:
Service type: OrderService/InventoryService
Operations: deliver

Internet Explorer v.11.0.9600.16384

Version-Release number of selected component (if applicable):
6.0.0.CR1

How reproducible: 100%


Steps to Reproduce:
1. install, deploy ordermgmt
2. send requests
3. add SRT widget, set some filter (for example InventoryService/lookupItem)
4. try to change filter - click LogisticsService
5. the operations drop down will not refresh and will still contain "lookupItem"

Actual results:


Expected results:


Additional info:

Comment 2 Andrej Vano 2014-01-20 15:00:15 UTC
This issue persist on IE 10.0.9200.16750

Comment 3 Eric Wittmann 2014-01-20 20:38:59 UTC
I believe this was caused by the following code:

https://github.com/Governance/rtgov/blob/master/modules/gadgets/src/main/webapp/rt-gadget/gadget.xml#L172-L174

The issue is that a change handler is being added to the drop-down, but never removed.  So every time the data is updated, another handler is added.  So the handlers just keep on building up.  

Also - the handler uses the data that was returned from the server rpc/json call.  That data is likely disappearing at some point, causing one of the multitude of handlers associated with the 'change' event to fail.  I assume that once one of them fails, the rest will not be called.

It's a guess, but my fix is to add the following line of code to "updateServiceDefinition":

thesvc.off('change');

This will remove all change event handlers from the drop-down, and hopefully fix the issue.  I'm not 100% convinced that the data required by the handler function (refreshOperationsOptions) will always be available... but I'm hoping!

Comment 4 Andrej Vano 2014-01-24 10:59:16 UTC
Hi Eric,

filtering works OK on IE10/IE11 with CR2-2.