Bug 999936

Summary: KPI preview disappears when editting KPI based on data from custom database
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: jschatte, pzapataf
Target Milestone: ER5   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:09:46 UTC 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:
Attachments:
Description Flags
Video of reproducing steps
none
Custom test database none

Description Jan Hrcek 2013-08-22 11:47:15 UTC
Created attachment 789164 [details]
Video of reproducing steps

Description of problem:
When editting KPI, which is using NVD3 as a chart renderer, the preview disappears and is not shown in the KPI editor window.

Version-Release number of selected0 component (if applicable):
BPMS 6.0.0.ER1, deployed on EAP 6.1.0

How reproducible:
Always

Steps to Reproduce:
Please see video of reproducing steps. For the test I use local file-based h2 database (attached) with username/password test

0. login using root user (please ignore the login screen - already reported issue with branding)
1. Configure External custom connection (JDBC based) using attached h2 database test.h2.db
2. Configure data provider based on this datasource (using "Select * from person;" as query
3. Add KPI panel to the page and configure it to use data provider from step 2


Actual results:
When you select different Domain / range (x/y axis - see 1:40 in the video) the KPI preview disappears and doesn't appear until you close the window.

Expected results:
The KPI preview should be displayed all the time when editting the KPI.

Additional info:

The database is created using the following DDL:

CREATE USER test PASSWORD 'test';
CREATE TABLE IF NOT EXISTS PERSON (ID INT PRIMARY KEY, NAME VARCHAR(30), AGE INT);
GRANT ALL ON PERSON TO test;
INSERT INTO PERSON (ID, NAME, AGE) VALUES (1, 'John Doe', 25);
INSERT INTO PERSON (ID, NAME, AGE) VALUES (2, 'Jane Doe', 20);
INSERT INTO PERSON (ID, NAME, AGE) VALUES (3, 'James Bond', 35);
INSERT INTO PERSON (ID, NAME, AGE) VALUES (4, 'Jim Blonde', 10);
INSERT INTO PERSON (ID, NAME, AGE) VALUES (5, 'Ludvig van Wokurka', 50);

Comment 1 Jan Hrcek 2013-08-22 11:49:18 UTC
Created attachment 789166 [details]
Custom test database

Test database used as data source to reproduce the issue.
Use the following to configure it in application:
URL: jdbc:h2:~/test (provided it is saved in your home dir)
username: test
password: test

Comment 2 Jan 2013-09-10 11:13:24 UTC
I have tried this in both jboss-as 7.1.1 and jboss eap 6.1.1.GA, and have not been able to reproduce it.

Comment 3 Jan Hrcek 2013-09-25 06:15:51 UTC
I checked with BPMS ER3 - the issue is still present. It seems that this problem is firefox-specific. On Google chrome it works correctly. Could you please try to reproduce it using Firefox v17 (extended support version of firefox - required by PRD)?

If you manage to reproduce the issue it might be helpful to check similar bug I reported, which caused UI not to be updated. In the end it was some issue with javascript - see https://bugzilla.redhat.com/show_bug.cgi?id=967443 and its 8th comment.

Comment 7 David Gutierrez 2013-10-15 17:31:21 UTC
Indeed, this is a Firefox specific issue. I was able to reproduce it and has been fixed.   

Github commit (master): https://github.com/droolsjbpm/dashboard-
builder/commit/1c7f8eba07f10c89f036bcf635f8fdf35e89921e

Github commit (6.0.x): https://github.com/droolsjbpm/dashboard-builder/commit/b15a33366b7a5a9fcb3b13db67d14f1c94c36bd1

Comment 8 Jan Hrcek 2013-12-02 07:24:12 UTC
Ok, now it works correctly even in firefox. Verified with BPMS 6.0.0 ER5.