Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-2044

Dashbuilder - Filter properties selected on a filter form are not used in the filtering if data provider is based on "SQL query"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 6.3.0
    • 6.2.0
    • BAM
    • None

      +++ 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.

            david.magallanes David Gutierrez
            rhn-support-alazarot Alessandro Lazarotti
            Jan Hrcek Jan Hrcek (Inactive)
            Jan Hrcek Jan Hrcek (Inactive)
            Alessandro Lazarotti, David Gutierrez, Jan Hrcek (Inactive), Kris Verlaenen, Lukáš Petrovický (Inactive), Oscar Molina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: