Bug 1295497 - Dashbuilder - Filter properties selected on a filter form are not used in the filtering if data provider is based on "SQL query"
Summary: Dashbuilder - Filter properties selected on a filter form are not used in the...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: BAM
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: DR1
: 6.3.0
Assignee: David Gutierrez
QA Contact: Gui Jospin
URL:
Whiteboard:
Depends On: 1282861
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-04 17:13 UTC by Alessandro Lazarotti
Modified: 2020-03-27 20:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1282861
Environment:
Last Closed: 2020-03-27 20:03:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Alessandro Lazarotti 2016-01-04 17:13:31 UTC
+++ This bug was initially created as a clone of Bug #1282861 +++

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.

--- Additional comment from JBoss Product and Program Management on 2015-11-17 11:30:08 EST ---

Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 2 Jan Hrcek 2016-02-17 15:21:45 UTC
Ok, verified with BPM Suite 6.3.0 DR1.


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