Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007130Openbravo ERP02. Master data managementpublic2009-01-26 12:302011-05-25 17:00
villind 
shuehner 
normalminoralways
closedfixed 
5
pi 
 
Core
No
0007130: Invalid substr index in SQL query in used parse-method of FileImport_data.xsql
File src/org/openbravo/erpCommon/ad_forms/FileImport_data.xsql contains SQL SUBSTR index 0.

Change the start position to 1 (first character). This works both Oracle and postgresql.
No tags attached.
related to defect 0007129 closed shuehner Import accounts does not import element level on postgresql 
related to defect 0007315 closed dalsasua Invalid substr index (=0) in SQL query. 
blocks feature request 0007236 acknowledged shuehner Tracking issue: Cleanup for 3.00 
diff Issue-7130.diff (658) 2009-01-26 12:33
https://issues.openbravo.com/file_download.php?file_id=729&type=bug
Issue History
2009-01-26 12:30villindNew Issue
2009-01-26 12:30villindAssigned To => rafaroda
2009-01-26 12:30villindsf_bug_id0 => 2537443
2009-01-26 12:30villindRegression testing => No
2009-01-26 12:33villindFile Added: Issue-7130.diff
2009-01-30 14:55rafarodaNote Added: 0012908
2009-01-30 14:55rafarodaStatusnew => feedback
2009-01-30 15:28villindNote Added: 0012912
2009-01-30 16:16shuehnerAssigned Torafaroda => shuehner
2009-01-30 16:17shuehnerNote Added: 0012920
2009-01-30 16:48villindRelationship addeddepends on 0007069
2009-01-30 16:49villindRelationship deleteddepends on 0007069
2009-01-30 16:49villindRelationship addedrelated to 0007069
2009-01-30 17:18villindRelationship deletedrelated to 0007069
2009-01-30 17:18villindRelationship addedrelated to 0007129
2009-02-02 14:28shuehnerRelationship addedrelated to 0007315
2009-02-02 14:31shuehnerNote Added: 0013016
2009-02-02 15:15villindNote Added: 0013019
2009-02-02 15:19shuehnerNote Added: 0013020
2009-02-02 15:19shuehnerSeveritymajor => minor
2009-02-02 15:19shuehnerStatusfeedback => new
2009-02-02 15:19shuehnerTypedefect => feature request
2009-02-02 15:19shuehnerversion2.40MP1 => trunk
2009-02-02 15:19shuehnerSummaryInvalid substr index in SQL query => Invalid substr index in SQL query in used parse-method of FileImport_data.xsql
2009-02-02 15:19shuehnerRelationship addedblocks 0007236
2011-05-03 13:52shuehnerStatusnew => scheduled
2011-05-03 13:52shuehnerfix_in_branch => pi
2011-05-03 13:53shuehnerNote Added: 0036312
2011-05-03 13:53shuehnerStatusscheduled => resolved
2011-05-03 13:53shuehnerFixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/5240baa48ad6 [^]
2011-05-03 13:53shuehnerResolutionopen => fixed
2011-05-25 17:00shuehnerNote Added: 0037438
2011-05-25 17:00shuehnerNote Added: 0037439
2011-05-25 17:00shuehnerStatusresolved => closed

Notes
(0012908)
rafaroda   
2009-01-30 14:55   
Hi Ville,

Thanks for the patch. But could you please write down the steps to make this fail within Openbravo ERP.

Thank you.
(0012912)
villind   
2009-01-30 15:28   
Try using this functionality with Postgresql. The SQL specification says that the substr position parameter specification is not zero based. Oracle treats 0 and 1 the same, but Postgresql is more strict with this.
(0012920)
shuehner   
2009-01-30 16:17   
I tried to find a user for the parse-method in which this sql statement is in and could not find a single in-tree user? Do you use this method in a custom modification or did i overlook a in-tree user?
(0013016)
shuehner   
2009-02-02 14:31   
I did create and link issue 7315 to fix all of the invalid substr instances in the codebase. I would like to retitle this issue to feature request to remove the unused parse function.
(0013019)
villind   
2009-02-02 15:15   
We are not using this method.
(0013020)
shuehner   
2009-02-02 15:19   
Changing to feature request to check if that method can be removed completely, as it is not used anywhere.
(0036312)
shuehner   
2011-05-03 13:53   
The functionality related to that file has been removed from core and put into the module containing the old deprecated content (for 3.0).

As the broken function was not even used before and now is moved out of core no need to fix the function -> Closing as resolved (with issue moving the code out of core).
(0037438)
shuehner   
2011-05-25 17:00   
The cleanup commit below removes the wrong methods completely from the module as it wasn't used at all.

https://code.openbravo.com/erp/mods/org.openbravo.importdata/rev/ac752dcd8f55 [^]
(0037439)
shuehner   
2011-05-25 17:00   
Marking as closed.