Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011416Openbravo ERPA. Platformpublic2009-11-19 14:192009-11-25 00:00
iperdomo 
mtaal 
immediatemajorsometimes
closedfixed 
202.6.30-gentoo-r5
pi 
 
Core
No
0011416: ad_update_table_identifier fails silently after a new table trigger change
An extra check was added to table names in in rev 416ee338a145 [1] to avoid invalid characters like blank space ' ', dot and slash.

There are modules built before this check was introduced and has some of the invalid characters, e.g. blank space.

The trigger is executed on ad_update_table_identifier(null, 'N') function call, the trigger fails but the ad_update_table_identifier fails silently, and you end up with tables without the sql_record_identifier column.

[1] https://code.openbravo.com/erp/devel/pi/annotate/416ee338a145/src-db/database/model/triggers/AD_TABLE_TRG.xml#l69 [^]

* Create a module with a table name containing an invalid character: '', '.', '/' in an previous 2.50 version like 2.50MP1
* Try to install that module in an latest pi based instance
* Check for invalid sql_record_identifier values
* sql_record_identifier should fail
* If you add a restriction like this one, you must check that a fallback is available
No tags attached.
related to defect 0008885 closed marvintm ** instead of the name of installed modules 
Issue History
2009-11-19 14:19iperdomoNew Issue
2009-11-19 14:19iperdomoAssigned To => mtaal
2009-11-19 14:20iperdomoRelationship addedrelated to 0008885
2009-11-19 14:20iperdomoStatusnew => scheduled
2009-11-19 14:20iperdomofix_in_branch => pi
2009-11-19 14:53shuehnerIssue Monitored: shuehner
2009-11-19 15:40mtaalNote Added: 0022023
2009-11-19 15:55shuehnerNote Added: 0022024
2009-11-19 23:26hgbotCheckin
2009-11-19 23:26hgbotNote Added: 0022039
2009-11-19 23:26hgbotStatusscheduled => resolved
2009-11-19 23:26hgbotResolutionopen => fixed
2009-11-19 23:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4887282d860c46b79f8bf8a629ff7268ddb386c2 [^]
2009-11-24 12:34iperdomoNote Added: 0022134
2009-11-24 12:34iperdomoStatusresolved => closed
2009-11-25 00:00anonymoussf_bug_id0 => 2903422

Notes
(0022023)
mtaal   
2009-11-19 15:40   
The idea is to make two changes:
- only do the name change when the ad_table.name changes or a new table is created
- ensure that illegal names are correctly caught when exporting/packaging a module

gr. Martin
(0022024)
shuehner   
2009-11-19 15:55   
first idea -> good
second idea: we already tell people with a warning i think (at least in generate.entities)... but perhaps raise this to error on export module/package module
(0022039)
hgbot   
2009-11-19 23:26   
Repository: erp/devel/pi
Changeset: 4887282d860c46b79f8bf8a629ff7268ddb386c2
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Thu Nov 19 23:25:51 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/4887282d860c46b79f8bf8a629ff7268ddb386c2 [^]

fixes issue 11416: ad_update_table_identifier fails silently after a new table trigger change

---
M src-db/database/model/triggers/AD_TABLE_TRG.xml
M src-test/org/openbravo/test/system/SystemValidatorTest.java
M src/org/openbravo/base/model/NamingUtil.java
M src/org/openbravo/service/system/ModuleValidator.java
---
(0022134)
iperdomo   
2009-11-24 12:34   
Tested on pi @ rev 608ad05b9556