Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gorbunkov opened this issue Jul 6, 2021 · 0 comments

Comments

@gorbunkov
Copy link
Contributor

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

@gorbunkov gorbunkov changed the title Report run dialog works incorrectly when a very old date is a report parameter Report run dialog works incorrectly with a very old date is a report parameter Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant