Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0011653 | Openbravo ERP | 00. Application dictionary | public | 2009-12-07 11:00 | 2010-01-23 00:00 |
|
Reporter | networkb | |
Assigned To | alostale | |
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | 2.40MP11 | |
Target Version | 2.40MP13 | Fixed in Version | 2.50MP11 | |
Merge Request Status | |
Review Assigned To | |
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 | 0011653: It is not possible to add a default value for Dates parameter |
Description | When a date parameter is included in a Process (Application Dictionary > Report and Process > Parameter), and a default value is used diferent from @#Date@, a compilation error is shown.
IE, this Default value is used: @SQL=SELECT (NOW()+90) FROM DUAL. And this is error is shown:
[javac] /opt/Openbravo240mp11/r2.40mp11/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButton_Responser.java:1099: cannot find symbol
[javac] symbol : variable Data
[javac] location: class org.openbravo.erpCommon.ad_actionButton.ActionButton_Responser
[javac] xmlDocument.setParameter("DateFrom", Data.selectActP800171_DateFrom(this));
[javac] ^
[javac] 1 error
Note: other querys have been tested (using SQL) and same error appears. |
Steps To Reproduce | As System Administrator, go to Application Dictionary > Report and Process.
Search Purchase Order Report
Go to Parameter tab.
Search Starting date.
As default value, enter: @SQL= SELECT (NOW()+90) FROM DUAL
Compile the application. (ant compile.development -Dtab=xx) |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | depends on | backport | 0011667 | 2.40MP13 | closed | alostale | It is not possible to add a default value for Dates parameter |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2009-12-07 11:00 | networkb | New Issue | |
2009-12-07 11:00 | networkb | Assigned To | => rafaroda |
2009-12-07 11:00 | networkb | OBNetwork customer | => Yes |
2009-12-07 19:25 | psarobe | Status | new => scheduled |
2009-12-07 19:25 | psarobe | Assigned To | rafaroda => alostale |
2009-12-07 19:25 | psarobe | fix_in_branch | => pi |
2009-12-07 19:25 | psarobe | Priority | immediate => high |
2009-12-07 19:25 | psarobe | fix_in_branch | pi => |
2010-01-12 17:29 | alostale | Note Added: 0023365 | |
2010-01-12 17:31 | hgbot | Checkin | |
2010-01-12 17:31 | hgbot | Note Added: 0023366 | |
2010-01-12 17:31 | hgbot | Status | scheduled => resolved |
2010-01-12 17:31 | hgbot | Resolution | open => fixed |
2010-01-12 17:31 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/dbb25c5d7e1ac620d9f15d306828c570c82552e3 [^] |
2010-01-15 10:48 | hgbot | Checkin | |
2010-01-15 10:48 | hgbot | Note Added: 0023468 | |
2010-01-15 10:48 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/dbb25c5d7e1ac620d9f15d306828c570c82552e3 [^] => http://code.openbravo.com/erp/devel/pi/rev/d0366e6b9fb60233978f9ea6ee2be52e02179908 [^] |
2010-01-20 23:25 | hudsonbot | Checkin | |
2010-01-20 23:25 | hudsonbot | Note Added: 0023637 | |
2010-01-20 23:26 | hudsonbot | Checkin | |
2010-01-20 23:26 | hudsonbot | Note Added: 0023655 | |
2010-01-22 07:53 | sureshbabu | Note Added: 0023730 | |
2010-01-22 07:53 | sureshbabu | Status | resolved => new |
2010-01-22 07:53 | sureshbabu | Resolution | fixed => open |
2010-01-22 09:24 | alostale | Note Added: 0023731 | |
2010-01-22 09:25 | alostale | Status | new => scheduled |
2010-01-22 09:25 | alostale | fix_in_branch | => pi |
2010-01-22 09:25 | alostale | Status | scheduled => resolved |
2010-01-22 09:25 | alostale | Resolution | open => fixed |
2010-01-22 10:18 | sureshbabu | Note Added: 0023732 | |
2010-01-22 10:18 | sureshbabu | Status | resolved => closed |
2010-01-22 10:18 | sureshbabu | Fixed in Version | => 2.50MP11 |
2010-01-23 00:00 | anonymous | sf_bug_id | 0 => 2937520 |
Notes |
|
|
In fact the problem is that it is not possible to set any sql default value parameters for action buttons to be called directly from menu (but it is for the ones called from buttons in tabs). |
|
|
(0023366)
|
hgbot
|
2010-01-12 17:31
|
|
Repository: erp/devel/pi
Changeset: dbb25c5d7e1ac620d9f15d306828c570c82552e3
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jan 12 17:30:41 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/dbb25c5d7e1ac620d9f15d306828c570c82552e3 [^]
fixed bug 11653: It is not possible to add a default value for Dates parameter
---
M src-wad/src/org/openbravo/wad/ProcessRelation_data.xsql
M src-wad/src/org/openbravo/wad/Wad.java
M src-wad/src/org/openbravo/wad/WadActionButton.java
A src-wad/src/org/openbravo/wad/ActionButtonDefault_data.xml
A src-wad/src/org/openbravo/wad/ActionButtonDefault_data.xsqlxml
---
|
|
|
(0023468)
|
hgbot
|
2010-01-15 10:48
|
|
Repository: erp/devel/pi
Changeset: d0366e6b9fb60233978f9ea6ee2be52e02179908
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 15 10:47:40 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d0366e6b9fb60233978f9ea6ee2be52e02179908 [^]
Related to issue 11653: New class generated conflict with existing one
---
M src-wad/src/org/openbravo/wad/ActionButtonDefault_data.xsqlxml
M src-wad/src/org/openbravo/wad/Wad.java
M src-wad/src/org/openbravo/wad/WadActionButton.java
---
|
|
|
|
|
|
|
|
|
|
Hi
when i compile the postgres context after making the given changes i am getting the below error:
compileSqlc:
[sql] Executing commands
[sql] 2 of 2 SQL statements executed successfully
[javac] Compiling 2 source files to /mnt2/OpenbravoERP-PI-Postgres/build/classes
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:17: <identifier> expected
[javac] public String ?column?;
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:17: <identifier> expected
[javac] public String ?column?;
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:25: illegal start of expression
[javac] return ?column?;
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:25: illegal start of expression
[javac] return ?column?;
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:26: illegal start of expression
[javac] else {
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:26: : expected
[javac] else {
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:35: class, interface, or enum expected
[javac] public static String selectActP800171_DateFrom(ConnectionProvider connectionProvider) throws ServletException {
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:37: class, interface, or enum expected
[javac] strSql = strSql +
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:40: class, interface, or enum expected
[javac] ResultSet result;
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:41: class, interface, or enum expected
[javac] String strReturn = "";
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:42: class, interface, or enum expected
[javac] PreparedStatement st = null;
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:44: class, interface, or enum expected
[javac] try {
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:47: class, interface, or enum expected
[javac] result = st.executeQuery();
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:48: class, interface, or enum expected
[javac] if(result.next()) {
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:50: class, interface, or enum expected
[javac] }
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:52: class, interface, or enum expected
[javac] } catch(SQLException e){
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:54: class, interface, or enum expected
[javac] throw new ServletException("@CODE=" + Integer.toString(e.getErrorCode()) + "@" + e.getMessage());
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:55: class, interface, or enum expected
[javac] } catch(Exception ex){
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:57: class, interface, or enum expected
[javac] throw new ServletException("@CODE=@" + ex.getMessage());
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:58: class, interface, or enum expected
[javac] } finally {
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:61: class, interface, or enum expected
[javac] } catch(Exception ignore){
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:63: class, interface, or enum expected
[javac] }
[javac] ^
[javac] /mnt2/OpenbravoERP-PI-Postgres/build/javasqlc/srcAD/org/openbravo/erpCommon/ad_actionButton/ActionButtonSQLDefaultData.java:66: class, interface, or enum expected
[javac] }
[javac] ^
[javac] 23 errors
BUILD FAILED
/mnt2/OpenbravoERP-PI-Postgres/build.xml:330: The following error occurred while executing this line:
/mnt2/OpenbravoERP-PI-Postgres/src/build.xml:312: Compile failed; see the compiler error output for details. |
|
|
|
The problem is in the suggested query, it needs (for PostgreSQL) an alias, so the default value should look like:
@SQL= SELECT (NOW()+90) as d FROM DUAL |
|
|
|
Tested working fine (compiled successfully after updating the below query @SQL=SELECT (NOW()+90) as d FROM DUAL) |
|