Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007315Openbravo ERPZ. Otherspublic2009-02-02 14:272009-04-21 12:39
shuehner 
dalsasua 
normalmajorhave not tried
closedfixed 
5
2.40MP1 
 
Core
No
0007315: Invalid substr index (=0) in SQL query.
We have several occurences of substr(<some string>,0,<length>) in the codebase. The first parameter is 1-based per SQL spec and a value of 0 does not work as expected on postgres.

List of affected files on both 2.40 and trunk:

- src-db/database/model/functions/C_COMMISSION_PROCESS.xml (2 times)
- src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql
- src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql (trunk only)

More Files covered by different issues:

- src/org/openbravo/erpCommon/ad_forms/FileImport_data.xsql (7130, function is unused)
- src/org/openbravo/erpCommon/ad_forms/InitialClientSetup_data.xsql (7129, already resolved)
No tags attached.
related to defect 0007129 closed shuehner Import accounts does not import element level on postgresql 
related to feature request 0007130 closed shuehner Invalid substr index in SQL query in used parse-method of FileImport_data.xsql 
related to defect 0007100 closed dalsasua While Importing Accounts Account type is coming as "Not found" 
depends on backport 0007411 closed dalsasua Invalid substr index (=0) in SQL query. 
Issue History
2009-02-02 14:27shuehnerNew Issue
2009-02-02 14:27shuehnerAssigned To => dalsasua
2009-02-02 14:27shuehnersf_bug_id0 => 2556950
2009-02-02 14:27shuehnerRegression testing => No
2009-02-02 14:28shuehnerRelationship addedrelated to 0007129
2009-02-02 14:28shuehnerRelationship addedrelated to 0007130
2009-02-02 14:28shuehnerRelationship addedrelated to 0007100
2009-02-06 11:35svnbotCheckin
2009-02-06 11:35svnbotNote Added: 0013212
2009-02-06 11:35svnbotStatusnew => resolved
2009-02-06 11:35svnbotResolutionopen => fixed
2009-02-06 11:35svnbotsvn_revision => 12880
2009-02-06 11:36dalsasuaStatusresolved => new
2009-02-06 11:36dalsasuaResolutionfixed => open
2009-02-06 11:36dalsasuaStatusnew => scheduled
2009-02-06 11:36dalsasuafix_in_branch => trunk
2009-02-06 11:36dalsasuaStatusscheduled => resolved
2009-02-06 11:36dalsasuaResolutionopen => fixed
2009-02-06 11:42svnbotCheckin
2009-02-06 11:42svnbotNote Added: 0013214
2009-02-06 11:42svnbotsvn_revision12880 => 12882
2009-04-21 12:39psarobeStatusresolved => closed

Notes
(0013212)
svnbot   
2009-02-06 11:35   
Repository: openbravo
Revision: 12880
Author: davidalsasua
Date: 2009-02-06 11:35:19 +0100 (Fri, 06 Feb 2009)

Fixes Bug 0007315: Invalid substr index (=0) in SQL query.

---
U trunk/src/org/openbravo/erpCommon/ad_actionButton/CreateFile_data.xsql
U trunk/src/org/openbravo/erpCommon/ad_forms/InitialOrgSetup_data.xsql
U trunk/src-db/database/model/functions/C_COMMISSION_PROCESS.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=12880&sc=1 [^]
(0013214)
svnbot   
2009-02-06 11:42   
Repository: openbravo
Revision: 12882
Author: davidalsasua
Date: 2009-02-06 11:42:41 +0100 (Fri, 06 Feb 2009)

Fixes Bug 0007315: Invalid substr index (=0) in SQL query.

---
U trunk/src-db/database/model/functions/C_COMMISSION_PROCESS.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=12882&sc=1 [^]