Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0036506Openbravo ERPA. Platformpublic2017-07-17 18:042022-02-01 08:05
ngarcia 
Triage Platform Base 
highminoralways
acknowledgedopen 
5
 
 
Core
No
0036506: Auxiliary Input is not computed if the SQL code has "IN (@#...@)"
Auxiliary Input is not computed if the SQL code has "IN (@#...@)"

The problem in the following piece of code of parseSQL function of UIDefinition class:

if (strAux.length() > 3
&& strAux.substring(strAux.length() - 3, strAux.length()).equals(" IN")) {
   strAux = " type=\"replace\" optional=\"true\" after=\"" + strAux1 + "\" text=\"'" + i + "'\"";
As system admin role:
   Create an auxiliary input (it could be used for display logic):
      Tab: Header - Sales Order
      Validation Code:
@SQL=SELECT 'Y' FROM ad_org org WHERE org.ad_orgtype_id = '1' AND org.ad_org_id IN (@#AD_Org_ID@)

As group admin role:
   Open the Sales Order window
   Check the log shows:

      ERROR org.openbravo.client.application.window.FormInitializationComponent - Error while computing auxiliary input parameter: AUXINP from tab: Header of window: Sales Order
org.postgresql.util.PSQLException: The column index is out of range: 1, number of columns: 0.
    at org.postgresql.core.v3.SimpleParameterList.bind(SimpleParameterList.java:56)
    at org.postgresql.core.v3.SimpleParameterList.setStringParameter(SimpleParameterList.java:118)
    at org.postgresql.jdbc.PgStatement.bindString(PgStatement.java:2144)
    at org.postgresql.jdbc.PgStatement.setString(PgStatement.java:1266)
    at org.postgresql.jdbc.PgStatement.setString(PgStatement.java:1248)
    at org.postgresql.jdbc.PgStatement.setObject(PgStatement.java:1831)
    at org.openbravo.client.application.window.FormInitializationComponent.computeAuxiliaryInput(FormInitializationComponent.java:1886)

As system admin role:
   Change the code of the auxiliary input with:

@SQL=SELECT 'Y' FROM ad_org org WHERE org.ad_orgtype_id = '1' AND org.ad_org_id = @#AD_Org_ID@

As group admin role:
   Open the Sales Order window
   Check the error is not shown in the log this time
No tags attached.
Issue History
2017-07-17 18:04ngarciaNew Issue
2017-07-17 18:04ngarciaAssigned To => platform
2017-07-17 18:04ngarciaModules => Core
2017-07-17 18:04ngarciaTriggers an Emergency Pack => No
2017-07-17 18:04ngarciaIssue Monitored: networkb
2017-07-17 18:06ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15523#r15523
2017-07-17 18:06ngarciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=15524#r15524
2017-07-24 15:44alostaleStatusnew => acknowledged
2022-02-01 08:05alostaleAssigned Toplatform => Triage Platform Base

There are no notes attached to this issue.