[#13676] - Datetimevalidator uses wrong Format

Category:
Bug report
Priority:
Urgent
Status:
New
Project: Severity:
Critical
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:
0

I upgraded form v7.2 to v7.8.

All Reports with java.sql.timestamp in parameters stopped working

The server uses german local and displays all values as configured in jasperserver/WEB-INF/bundles/jasperserver_config_de.properties

After changing the value of timestamp parameter there is an invalid value error message and all depending input controls lose there values.

I found out that the expression for validating the paramter is wrong:

ateTimeFormatValidationRule: {errorMessage: "Geben Sie einen gültigen Datums-/Uhrzeitwert an.", format: "yyyy-MM-dd'T'HH:mm:ss"}
errorMessage: "Geben Sie einen gültigen Datums-/Uhrzeitwert an."
format: "yyyy-MM-dd'T'HH:mm:ss"

After that i did some research in source code and found out that these values are hardcodes in file:
package com.jaspersoft.jasperserver.inputcontrols.util;

import com.jaspersoft.jasperserver.inputcontrols.util.DefaultCalendarFormatProvider;

/**
* <p></p>
*
* @author yaroslav.kovalchyk
* @version $Id$
*/
public class IsoCalendarFormatProvider extends DefaultCalendarFormatProvider {
@Override
protected String getDatetimeFormatPattern() {
return "yyyy-MM-dd'T'HH:mm:ss";
}

@Override
protected String getTimeFormatPattern() {
return "HH:mm:ss";
}

@Override
protected String getDateFormatPattern() {
return "yyyy-MM-dd";
}
}

So there is no chance for the validator to check if the value looks like configured.

v7.8
Input Controls
christian.philipp's picture
Joined: Apr 15 2014 - 7:43am
Last seen: 2 weeks 2 days ago
Feedback
randomness