Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013640Openbravo ERPA. Platformpublic2010-06-14 11:462012-04-01 20:37
shuehner 
AugustoMauch 
urgentmajorhave not tried
closedfixed 
5
pi 
 
Core
No
0013640: api-check needs to be updated to check for onCreateDefault for new,required columns in tables contained in the AD dataset
In regular tables the normal default clause is also used as value for onCreateDefault if it is needed.

However for tables contained in the AD dataset an explicit onCreatedDefault is always needed (see 13638 for a problem caused by this).
No tags attached.
related to defect 0013638 closed marvintm AD_PREFERENCE table had new required column added without an onCreateDefault 
zip org.openbravo.testIssue13640.zip (5,762) 2012-03-05 17:18
https://issues.openbravo.com/file_download.php?file_id=5053&type=bug
Issue History
2010-06-14 11:46shuehnerNew Issue
2010-06-14 11:46shuehnerAssigned To => marvintm
2010-06-14 11:46shuehnerRelationship addedrelated to 0013638
2010-06-23 10:41alostaleAssigned Tomarvintm => alostale
2010-06-23 10:41alostaleStatusnew => scheduled
2010-06-23 10:41alostalefix_in_branch => pi
2012-02-28 16:29alostaleAssigned Toalostale => AugustoMauch
2012-03-05 11:56hgbotCheckin
2012-03-05 11:56hgbotNote Added: 0046034
2012-03-05 11:56hgbotStatusscheduled => resolved
2012-03-05 11:56hgbotResolutionopen => fixed
2012-03-05 11:56hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/98f5283630eb363c0f64c3483116c6ab81dff863 [^]
2012-03-05 16:12hgbotCheckin
2012-03-05 16:12hgbotNote Added: 0046046
2012-03-05 16:12hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/98f5283630eb363c0f64c3483116c6ab81dff863 [^] => http://code.openbravo.com/erp/devel/pi/rev/90f0311b42bf3d10a894185608f4958084181a6a [^]
2012-03-05 17:16AugustoMauchNote Added: 0046052
2012-03-05 17:16AugustoMauchStatusresolved => new
2012-03-05 17:16AugustoMauchResolutionfixed => open
2012-03-05 17:18AugustoMauchFile Added: org.openbravo.testIssue13640.zip
2012-03-05 17:18AugustoMauchStatusnew => scheduled
2012-03-05 17:20AugustoMauchStatusscheduled => resolved
2012-03-05 17:20AugustoMauchResolutionopen => fixed
2012-03-05 17:31AugustoMauchNote Added: 0046054
2012-03-05 17:31AugustoMauchNote Added: 0046055
2012-03-16 16:09marvintmStatusresolved => closed
2012-04-01 20:37hudsonbotCheckin
2012-04-01 20:37hudsonbotNote Added: 0047033

Notes
(0046034)
hgbot   
2012-03-05 11:56   
Repository: erp/devel/dbsm-main
Changeset: 98f5283630eb363c0f64c3483116c6ab81dff863
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Mar 05 11:55:40 2012 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/98f5283630eb363c0f64c3483116c6ab81dff863 [^]

Fixes issue 13640: New, required columns of AD should define onCreateDefault

A new validation has been added to ValidateAPIModel to check that there are no new, required columns in the AD dataset without onCreateDefault. A new constructor has been added to enter the AD dataset as an input parameter, and the calls to this class have been updated.

---
M src/org/openbravo/ddlutils/task/CheckAPI.java
M src/org/openbravo/ddlutils/task/CheckAPIDistribution.java
M src/org/openbravo/ddlutils/task/ExportDatabase.java
M src/org/openbravo/ddlutils/util/ValidateAPIModel.java
---
(0046046)
hgbot   
2012-03-05 16:12   
Repository: erp/devel/pi
Changeset: 90f0311b42bf3d10a894185608f4958084181a6a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Mar 05 15:49:40 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/90f0311b42bf3d10a894185608f4958084181a6a [^]

Fixes issue 13640: New, required columns of AD should define onCreateDefault

A new validation has been added to ValidateAPIModel to check that there are no new, required columns in the AD dataset without onCreateDefault. A new constructor has been added to enter the AD dataset as an input parameter, and the calls to this class have been updated.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0046052)
AugustoMauch   
2012-03-05 17:16   
Reopened to attach a module
(0046054)
AugustoMauch   
2012-03-05 17:31   
Test plan:

Download the attached file and extract it in the modules/ folder of your openbravo. This file contains eight new columns and fields that comprise all possible combinations of mandatory / no mandatory, AD dataset / not AD dataset, onCreateDefault / not onCreateDefault.

Of all these new columns, the one that is not valid is the one that is defined in AD_Field, that is mandatory and that does not have any onCreateDefault defined.

Execute the task ant run.api.test.model. The task should fail, and message similar to the following should have been displayed:

[checkAPI] 33634 ERROR - +++++++++++++++++++++++++++++++++++++++++++++++++++
 [checkAPI] 33641 ERROR - Errors in API model validation
 [checkAPI] 33650 ERROR - +++++++++++++++++++++++++++++++++++++++++++++++++++
 [checkAPI] 33658 ERROR - Added mandatory column without onCreateDefault in a table contained in the AD dataset: AD_FIELD.EM_I13640_MAN_AD_NODEFAULT
(0046055)
AugustoMauch   
2012-03-05 17:31   
This fix is not risky.
(0047033)
hudsonbot   
2012-04-01 20:37   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/640de9acc2d5 [^]

Maturity status: Test