Skip to content

Report run dialog works incorrectly with a very old date is a report parameter #290

@gorbunkov

Description

@gorbunkov

Environment

  • Platform version: 7.2.13

Description of the bug or enhancement

  1. Create the entity with a Date field
  2. Create a report with "Table" output type based on JPQL query. The query must have a condition with Date parameter, e.g.:
select
e.stringField as "stringField",
e.dateField as "dateField"
from sample_MyEntity e where e.dateField >= ${dateField1}

Create a couple of entity instances. One of them should have a very old date in a date field, e.g. 01/01/0001

image

Run the report from the Report editor - type the 01/01/0001 value as a date parameter value

image

Expected behavior: the entity with the 01/01/0001 field will be in the results table
Actual behavior: the entity with the 01/01/0001 field IS NOT in the results table

image

The problem is that DateField transforms the date and store the date modified by the com.haulmont.cuba.core.global.DateTimeTransformations. For very old dates these transformations are probably done incorrectly.

The sample project: report-date-error.zip

The forum topic: https://forum.cuba-platform.com/t/pivot-table-max-data-size/14866

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions