Bug 1282861 - [GSS](6.2.z) Dashbuilder - Filter properties selected on a filter form are not used in the filtering if data provider is based on "SQL query"
[GSS](6.2.z) Dashbuilder - Filter properties selected on a filter form are no...
Status: VERIFIED
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BAM (Show other bugs)
6.2.0
Unspecified Unspecified
high Severity urgent
: CR1
: 6.2.1
Assigned To: David Gutierrez
Jan Hrcek
:
Depends On:
Blocks: 1288023 1295497
  Show dependency treegraph
 
Reported: 2015-11-17 11:23 EST by Oscar Molina
Modified: 2016-01-18 04:22 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1295497 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Oscar Molina 2015-11-17 11:23:38 EST
Description of problem:

'Filter & Drill-down' panel allows for the quick definition of dynamic forms which allow us to navigate throughout the data displayed by the dashboard.

Some filter properties selected on a filter form are not used in the filtering if data provider is based on "SQL query" in Dashbuilder for BPMS 6.1.

We have built a start page with some basic info. There is a filter panel for 2 properties. Both of the properties are sent to a detailed page with more information using conditional queries. On the detail screen, we filter the data based on these two properties, with a SQL query as follows:

select ....
where ({sql_condition, optional, name, name1}
and {sql_condition, optional, date, date1})

But the detail screen is never filtering automatically on both values. If only one of them is selected, filtering is OK. If both properties are selected, only one of them is used for filtering. Expected is that both properties are filtered on.

If you access to the console.jsp as "root" (http://localhost:8080/dashbuilder/system/console.jsp) and go to the "System > Thread Profiler", you can see that the query doesn't show one of the filtering properties when the filter is executed.

Steps to Reproduce:

1. Create the following test table in the local database. It doesn't matter the database. We have tested with Postgresql.

CREATE TABLE mytest (
   dbid bigint PRIMARY KEY,
   name varchar (512),
   date TIMESTAMP
);

2. Insert some registers as follow:

INSERT INTO mytest (dbid,name,date) VALUES (nextval('hiberante_sequence'),'John Smith','2015-10-01 12:00');
INSERT INTO mytest (dbid,name,date) VALUES (nextval('hibernate_sequence'),'John Smith','2015-11-03 12:00');
INSERT INTO mytest (dbid,name,date) VALUES (nextval('hibernate_sequence'),'John Smith','2015-11-10 12:00');
INSERT INTO mytest (dbid,name,date) VALUES (nextval('hibernate_sequence'),'Kelly Doe','2015-10-15 12:00');
INSERT INTO mytest (dbid,name,date) VALUES (nextval('hibernate_sequence'),'Kelly Doe','2015-16-16 12:00');

3. Go to 'Dashboards -> Business Dashboards -> Administration -> Data providers'

4. Create the following data providers:

* DP1 * -> type: SQL Query 
select date as "date(1)", name as "name(1)" from mytest
order by date asc;

* DP2 * -> type: SQL Query 
select dbid, name, date from mytest
where {sql_condition, optional, mytest.name, name(1)}
AND {sql_condition, required, mytest.date, date(1)}
ORDER BY date asc;

5. Create 2 pages: "testpage" and "testpage2".

6. In the "testpage":
 - Add a "Key performance indicator" panel with data provider "DP1"
 - Add a "Filter & Drill-down" panel with "date" and "name" properties visible which have configured "Drill-down" to "testpage2".

7. In the "testpage2":
 - Add a "Key performance indicator" panel with data provider "DP2"
 - Add a "Filter & Drill-down" panel with "date" and "name" properties visible.

Actual results:

If only one of them is selected, filtering is OK. If both properties are selected, only one of them is used for filtering.

Expected results:

If one of them or both are selected, filtering should work.
Comment 2 David Gutierrez 2016-01-08 04:13:03 EST
Fix + test done.

PRs pushed:

(master) https://github.com/droolsjbpm/dashboard-builder/pull/36
(6.3.x) https://github.com/droolsjbpm/dashboard-builder/pull/37
Comment 3 Kris Verlaenen 2016-01-10 16:22:42 EST
PRs were merged.
Comment 4 Jan Hrcek 2016-01-18 04:22:11 EST
Verified the scenario described with BPM Suite 6.2.1 CR1. Filtering is working as expected, taking all selected filters into consideration.

Note You need to log in before you can comment on or make changes to this bug.