Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-8970

SQLDataSets filtering by date params calculates a wrong Timestamp

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.31.0.Final
    • Fix Version/s: None
    • Component/s: Dashboard Builder
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1) let's have an SQLDataSet that is defined with a query against the product table audittaskimpl.

      e.g. "select taskid, lastmodificationdate from audittaskimpl"

      2) let's filter the DataSet by the lastmodificationdate column and using the following java.util.Date instance -> "2020-01-06T11:20:43.042+0100" (note that for the report the toString() value is shown, but the java.util.Date instance was used.)

      3) this is the native query generated by the DataSet.

      SELECT taskid, lastmodificationdate from audittaskimpl
      WHERE lastmodificationdate >= TIMESTAMP '2020-01-06 11:20:43.42'

      4) the milliseconds for the generated TIMESTAMP for the query are wrong,
      see that the java.sql.Date parameter has "042" milliseconds but the generated timestamp has "42" = "420" milliseconds.

      the correct timestamp should be like this -> TIMESTAMP '2020-01-06 11:20:43.042'

      note: the issue was find with a postgresql database

      Show
      1) let's have an SQLDataSet that is defined with a query against the product table audittaskimpl. e.g. "select taskid, lastmodificationdate from audittaskimpl" 2) let's filter the DataSet by the lastmodificationdate column and using the following java.util.Date instance -> "2020-01-06T11:20:43.042+0100" (note that for the report the toString() value is shown, but the java.util.Date instance was used.) 3) this is the native query generated by the DataSet. SELECT taskid, lastmodificationdate from audittaskimpl WHERE lastmodificationdate >= TIMESTAMP '2020-01-06 11:20:43.42' 4) the milliseconds for the generated TIMESTAMP for the query are wrong, see that the java.sql.Date parameter has "042" milliseconds but the generated timestamp has "42" = "420" milliseconds. the correct timestamp should be like this -> TIMESTAMP '2020-01-06 11:20:43.042' note: the issue was find with a postgresql database
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      When we have an SQLDataSet that has a date/timestamp field "XXX" and the query is filtered by "XXX" a wrong timestamp is calculated in the generated query.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                davidredhat David Gutierrez
                Reporter:
                wmedvede Walter Medvedeo
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: