Openbravo Issue Tracking System - Openbravo ERP | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0027261 | Openbravo ERP | 05. Production management | public | 2014-08-01 17:17 | 2014-10-02 14:26 |
Reporter | shuehner | ||||
Assigned To | reinaldoguerra | ||||
Priority | urgent | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | 3.0PR15Q1 | Fixed in Version | 3.0PR14Q4 | ||
Merge Request Status | |||||
Review Assigned To | vmromanos | ||||
OBNetwork customer | OBPS | ||||
Web browser | |||||
Modules | Core | ||||
Support ticket | |||||
Regression level | |||||
Regression date | |||||
Regression introduced in release | |||||
Regression introduced by commit | |||||
Triggers an Emergency Pack | No | ||||
Summary | 0027261: Wrong usage of to_char in two xsql files | ||||
Description | The following two files: src/org/openbravo/erpCommon/ad_actionButton/EditCCPMeasureValues_Values_data.xsql src/org/openbravo/erpCommon/ad_reports/ReportGuaranteeDate_data.xsql Have code similar to select to_date('31/12/9999') in them. Which is wrong. As checking to_date function (to_date(text) in prescript-postgresql) shows that this call boils down to: select to_timestamp('31/12/9999', dateFormat()); With that function dateFormat being created/updated from Openbravo.properties. But in short it means that dateformat can be configured and be anything so it cannot be compatible (at least not always) with a fixed format date-value. Most code instead does the following which is garanteed to work always: select to_date('31-12-9999', 'DD-MM-YYYY') The 2 files doing that wrong should be changed as well. NOTE: That wrong syntax to_timestamp is accepted by standard postgres. However it is not accepted by ppas 9.1 (enterprise db commercial version of postgres). | ||||
Steps To Reproduce | Compare running that call: select pg_catalog.to_timestamp('31/12/9999', 'DD-MM-YYYY'); and check output on 1.) standard postgres 9999-12-31 00:00:00+01 So accepted 2.) ppas9.1 ERROR: invalid value "/1" for "MM" DETAIL: Value must be an integer. Rejected | ||||
Proposed Solution | Apply attached patch to fix sql | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=7119&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2014-08-01 17:17 | shuehner | New Issue | |||
2014-08-01 17:17 | shuehner | Assigned To | => dmiguelez | ||
2014-08-01 17:17 | shuehner | OBNetwork customer | => No | ||
2014-08-01 17:17 | shuehner | Modules | => Core | ||
2014-08-01 17:17 | shuehner | Triggers an Emergency Pack | => No | ||
2014-08-01 17:17 | shuehner | File Added: 27261.diff | |||
2014-08-01 17:18 | shuehner | Note Added: 0069039 | |||
2014-08-26 17:28 | shuehner | OBNetwork customer | No => Yes | ||
2014-08-26 17:28 | shuehner | Note Added: 0069769 | |||
2014-09-01 16:29 | jonalegriaesarte | Resolution time | => 1412114400 | ||
2014-09-03 14:05 | eduardo_Argal | Assigned To | dmiguelez => eduardo_Argal | ||
2014-09-22 16:34 | jonalegriaesarte | Target Version | 3.0PR14Q4 => 3.0PR15Q1 | ||
2014-09-25 05:49 | reinaldoguerra | Assigned To | eduardo_Argal => reinaldoguerra | ||
2014-09-25 05:49 | reinaldoguerra | Status | new => scheduled | ||
2014-09-30 17:25 | hgbot | Checkin | |||
2014-09-30 17:25 | hgbot | Note Added: 0070572 | |||
2014-09-30 17:25 | hgbot | Status | scheduled => resolved | ||
2014-09-30 17:25 | hgbot | Resolution | open => fixed | ||
2014-09-30 17:25 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/a80c97c10d9804d517eb3324b57b403f611c5183 [^] | ||
2014-09-30 17:26 | vmromanos | Review Assigned To | => vmromanos | ||
2014-09-30 17:26 | vmromanos | Status | resolved => closed | ||
2014-10-02 14:26 | shuehner | Fixed in Version | => 3.0PR14Q4 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|