Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0011653
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 00. Application dictionaryminoralways2009-12-07 11:002010-01-23 00:00
ReporternetworkbView Statuspublic 
Assigned Toalostale 
PriorityhighResolutionfixedFixed in Version2.50MP11
StatusclosedFix in branchpiFixed in SCM revisiond0366e6b9fb6
ProjectionnoneETAnoneTarget Version2.40MP13
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product Version2.40MP11SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0011653: It is not possible to add a default value for Dates parameter

DescriptionWhen 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 ReproduceAs 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)
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 00116672.40MP13 closedalostale It is not possible to add a default value for Dates parameter 

-  Notes
(0023365)
alostale (manager)
2010-01-12 17:29

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 (developer)
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 (developer)
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
---
(0023637)
hudsonbot (developer)
2010-01-20 23:25

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/dbb25c5d7e1a [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]
(0023655)
hudsonbot (developer)
2010-01-20 23:26

A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/d0366e6b9fb6 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]
(0023730)
sureshbabu (reporter)
2010-01-22 07:53

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.
(0023731)
alostale (manager)
2010-01-22 09:24

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
(0023732)
sureshbabu (reporter)
2010-01-22 10:18

Tested working fine (compiled successfully after updating the below query @SQL=SELECT (NOW()+90) as d FROM DUAL)

- 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 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


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker