Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028265Openbravo ERPA. Platformpublic2014-11-24 16:322014-12-30 23:26
aaroncalero 
AugustoMauch 
immediatemajorhave not tried
closedfixed 
5
 
3.0PR15Q1 
AugustoMauch
Core
Coding ( Testing )
2014-11-18
pi
https://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^]
No
0028265: Fields defined as DateTime with a default value @#Date@ don't work
Fields defined as DateTime with a default value @#Date@ don't work. When trying to create a new record with such a field in it, an exception is raised [1] and the DateTime field is left empty.

[1] Exception in eclipse console/Openbravo.log:
2014-11-24 16:15:48,079 [ajp-localhost%2F127.0.0.1-8809-3] ERROR org.openbravo.base.exception.OBException - Exception when parsing date
java.text.ParseException: Unparseable date: "Mon Nov 24 16:15:48 CET 2014"
    at java.text.DateFormat.parse(DateFormat.java:354)
    at org.openbravo.client.kernel.reference.DateTimeUIDefinition.convertLocalTimeToUTC(DateTimeUIDefinition.java:72)
    at org.openbravo.client.kernel.reference.DateTimeUIDefinition.convertToClassicString(DateTimeUIDefinition.java:65)
    at org.openbravo.client.kernel.reference.UIDefinition.setNOWDefault(UIDefinition.java:287)
    at org.openbravo.client.kernel.reference.UIDefinition.getFieldProperties(UIDefinition.java:191)
    at org.openbravo.client.application.window.FormInitializationComponent.computeColumnValues(FormInitializationComponent.java:670)
    at org.openbravo.client.application.window.FormInitializationComponent.execute(FormInitializationComponent.java:258)
    at org.openbravo.client.kernel.BaseActionHandler.execute(BaseActionHandler.java:71)
    at org.openbravo.client.kernel.KernelServlet.processActionRequest(KernelServlet.java:294)
    at org.openbravo.client.kernel.KernelServlet.doGet(KernelServlet.java:186)
    at org.openbravo.client.kernel.KernelServlet.doPost(KernelServlet.java:267)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:449)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:88)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:59)
    at org.openbravo.client.kernel.KernelServlet.service(KernelServlet.java:168)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:450)
    at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:399)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
    at java.lang.Thread.run(Thread.java:701)
Steps to Reproduce:
Go to https://livebuilds.openbravo.com/retail_pi_pgsql [^]
Login as Openbravo/openbravo
Switch to White Valley Group Admin role
Go to the Assortment window.
Select an existing assortment, go to the Product tab and create a new record there.
Check the end of the log (https://livebuilds.openbravo.com/logs/retail_pi_pgsql_openbravo.log [^]) and see the exception
No tags attached.
caused by defect 00276283.0PR15Q1 closed AugustoMauch Some DateTime fields are not converted to the proper timezone 
Issue History
2014-11-24 16:32aaroncaleroNew Issue
2014-11-24 16:32aaroncaleroAssigned To => AugustoMauch
2014-11-24 16:32aaroncaleroModules => Core
2014-11-24 16:32aaroncaleroTriggers an Emergency Pack => No
2014-11-24 18:27alostaleRegression level => Coding ( Testing )
2014-11-24 18:27alostaleRegression introduced in release => pi
2014-11-24 18:27alostalePrioritynormal => immediate
2014-11-25 12:51AugustoMauchRegression date => 2014-11-18
2014-11-25 12:51AugustoMauchRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/a86294635ce386152bb473773b0c9ba45f81fa81 [^]
2014-11-25 12:51AugustoMauchRelationship addedcaused by 0027628
2014-11-25 15:46hgbotCheckin
2014-11-25 15:46hgbotNote Added: 0071997
2014-11-25 15:46hgbotStatusnew => resolved
2014-11-25 15:46hgbotResolutionopen => fixed
2014-11-25 15:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/2c2841f894b42fdf358281c2d13af06452c788d6 [^]
2014-11-25 16:43AugustoMauchReview Assigned To => AugustoMauch
2014-11-25 16:43AugustoMauchNote Added: 0072001
2014-11-25 16:43AugustoMauchStatusresolved => closed
2014-11-25 16:43AugustoMauchFixed in Version => 3.0PR15Q1
2014-12-30 23:26hudsonbotCheckin
2014-12-30 23:26hudsonbotNote Added: 0073138

Notes
(0071997)
hgbot   
2014-11-25 15:46   
Repository: erp/devel/pi
Changeset: 2c2841f894b42fdf358281c2d13af06452c788d6
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Nov 25 15:44:05 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/2c2841f894b42fdf358281c2d13af06452c788d6 [^]

Fixes issue 28265, fixes issue 27628: Prevents exception when parsing date

Instead of converting the date to String and then parsing it back to Date, just pass the Date object as a parameter to the convertLocalTimeToUTC method

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/DateTimeUIDefinition.java
---
(0072001)
AugustoMauch   
2014-11-25 16:43   
Code reviewed and verified in pi@d8acdd64b6bf
(0073138)
hudsonbot   
2014-12-30 23:26   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6525fe229e06 [^]
Maturity status: Test