-
Bug
-
Resolution: Done
-
Blocker
-
6.2.0
-
None
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 (
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.
- blocks
-
RHBPMS-2044 Dashbuilder - Filter properties selected on a filter form are not used in the filtering if data provider is based on "SQL query"
- Verified
- is duplicated by
-
RHBPMS-2044 Dashbuilder - Filter properties selected on a filter form are not used in the filtering if data provider is based on "SQL query"
- Verified