Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013664Openbravo ERPA. Platformpublic2010-06-15 17:262011-01-27 00:00
shuehner 
shuehner 
urgentmajorhave not tried
closedfixed 
5
pi 
 
Core
No
0013664: api-check should get special case for newly added std-boolean-constraint for newly added columns.
The api-check always complains about newly added constraint. However those are safe, if they only concern newly added columns.
However detecting this would mean parsing all the sql-check-string which is unfeasible.

However a simple special case occurs often. A new char(1) (aka boolean) column is added and the usual check-constraint (for 'Y','N') with it. This constraint has a defined syntax always and should be able to be detected easily.

Adding this special case to the api-check would mean less false-positives which need to be handled differently.
Add new special case to api-check

in case a new check constraint is added and matches the pattern for the standard 'Y','N' constraint and hte column name in the pattern is also a newly added column in the same check -> don't report as error

in all other cases -> report as done now
No tags attached.
Issue History
2010-06-15 17:26shuehnerNew Issue
2010-06-15 17:26shuehnerAssigned To => alostale
2011-01-24 17:46shuehnerAssigned Toalostale => shuehner
2011-01-24 17:52hgbotCheckin
2011-01-24 17:52hgbotNote Added: 0033842
2011-01-24 17:53shuehnerNote Added: 0033843
2011-01-24 17:57hgbotCheckin
2011-01-24 17:57hgbotNote Added: 0033844
2011-01-24 17:57hgbotStatusnew => resolved
2011-01-24 17:57hgbotResolutionopen => fixed
2011-01-24 17:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b8c227ba3b2400ddea4052259ef72299444b0627 [^]
2011-01-26 12:04marvintmStatusresolved => closed
2011-01-27 00:00anonymoussf_bug_id0 => 3166237

Notes
(0033842)
hgbot   
2011-01-24 17:52   
Repository: erp/devel/dbsm-main
Changeset: b411b82706ed8a7c14066e4827fd3fdd9a1e4c98
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Jan 24 17:51:09 2011 +0100
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/b411b82706ed8a7c14066e4827fd3fdd9a1e4c98 [^]

Issue 13664: Skip complaining about new bool-constraint for new columns
Adding a new boolean column with its 'usual' boolean constraint is fine and
common so special case it in the api-check so no complaint is generated.

Api-Check errors are still generated for other new constraints
as well as warnings for changing check constraints.

To allow to follow that reasoning an info message block is added to the output
for informal messages not letting the api-check fail.

---
M src/org/openbravo/ddlutils/task/CheckAPI.java
M src/org/openbravo/ddlutils/task/CheckAPIDistribution.java
M src/org/openbravo/ddlutils/util/ValidateAPI.java
M src/org/openbravo/ddlutils/util/ValidateAPIModel.java
---
(0033843)
shuehner   
2011-01-24 17:53   
Tested in pi using the following three testcases
a.) add new boolean column + check constraint for it together -> no error but info message now
b.) add boolean check constraint for existing column -> should trigger error as before
c.) add non-boolean check constraint (some other check constraint) -> should trigger error as before

all worked fine.
(0033844)
hgbot   
2011-01-24 17:57   
Repository: erp/devel/pi
Changeset: b8c227ba3b2400ddea4052259ef72299444b0627
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Mon Jan 24 17:57:12 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/b8c227ba3b2400ddea4052259ef72299444b0627 [^]

Fixed 13664: Skip complaining about new bool-constraint for new columns
Adding a new boolean column with its 'usual' boolean constraint is fine and
common so special case it in the api-check so no complaint is generated.

Api-Check errors are still generated for other new constraints
as well as warnings for changing check constraints.

To allow to follow that reasoning an info message block is added to the output
for informal messages not letting the api-check fail.

---
M src-db/database/lib/dbsourcemanager.jar
---