Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010428Openbravo ERPA. Platformpublic2009-08-28 17:482009-10-16 00:00
iperdomo 
alostale 
urgentmajoralways
closedfixed 
202.6.28-gentoo-r5
2.50MP3 
pi 
Core
No
0010428: Create columns from DB process should check that the common columns are present
If you read the DB concepts chapter [1] you'll see that there are commons columns required on each table in Openbravo.

You can create a table without those columns in the database and register it in the Application Dictionary. When you try to use that table you'll get strange compilation behavior.

[1] http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/Concepts/DB/Tables#Common_Columns [^]
* Create a table with just 2 fields. e.g.
- Table name: test
 - Column name: test_id
 - Column name: field 1
* Go to register the table in the Application Dictionary using the 'Create columns from DB' process
* You get the 2 colums
* Try to create a Window and Tab with this table
* Compile the newly created window
The 'Create columns from DB' must fail if the common columns are not present in the newly created table.
No tags attached.
related to defect 0009779 closed alostale Create columns from DB bugs 
Issue History
2009-08-28 17:48iperdomoNew Issue
2009-08-28 17:48iperdomoAssigned To => rafaroda
2009-08-31 08:15rafarodaAssigned Torafaroda => alostale
2009-08-31 08:15rafarodaPrioritynormal => urgent
2009-08-31 08:15rafarodaStatusnew => scheduled
2009-10-06 09:37alostaleRelationship addedrelated to 0009779
2009-10-07 08:19alostaleStatusscheduled => resolved
2009-10-07 08:19alostaleFixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/b68a7df30dce [^]
2009-10-07 08:19alostaleResolutionopen => fixed
2009-10-08 16:01iperdomoStatusresolved => new
2009-10-08 16:01iperdomoResolutionfixed => open
2009-10-08 16:01iperdomoNote Added: 0020880
2009-10-08 16:22psarobeNote Added: 0020881
2009-10-08 16:23psarobeStatusnew => scheduled
2009-10-08 16:23psarobefix_in_branch => pi
2009-10-08 17:34hgbotCheckin
2009-10-08 17:34hgbotNote Added: 0020884
2009-10-08 17:34hgbotStatusscheduled => resolved
2009-10-08 17:34hgbotResolutionopen => fixed
2009-10-08 17:34hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/devel/pi/rev/b68a7df30dce [^] => http://code.openbravo.com/erp/devel/pi/rev/f2c6cb563ee0fff4bfaefb2f19417d629222388e [^]
2009-10-15 19:13iperdomoNote Added: 0021089
2009-10-15 19:14iperdomoStatusresolved => closed
2009-10-15 19:14iperdomoNote Added: 0021091
2009-10-15 19:14iperdomoFixed in Version => pi
2009-10-16 00:00anonymoussf_bug_id0 => 2880174

Notes
(0020880)
iperdomo   
2009-10-08 16:01   
The fix of the related issue does not fix this defect.

The process must fail if one of the *required common columns* are not present. The changeset associated with the other issue is just about DATE and TIMESTAMP support.

Iván
(0020881)
psarobe   
2009-10-08 16:22   
QA will pass this defect as resolved if the message is good enough for the person who is going to read it.
The message should say not only that the process has failed but why and what to do
(0020884)
hgbot   
2009-10-08 17:34   
Repository: erp/devel/pi
Changeset: f2c6cb563ee0fff4bfaefb2f19417d629222388e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Oct 08 17:34:22 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f2c6cb563ee0fff4bfaefb2f19417d629222388e [^]

fixed bug 0010428: Create columns from DB process should check that the common columns are present

---
M src-db/database/model/functions/AD_TABLE_IMPORT.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0021089)
iperdomo   
2009-10-15 19:13   
@psarobe:
The message says why. I think this message is clear enough to know 'what' to do.
eg.
      
Error:
The following mandatory columns are missing for this table:
-primary key column named: obcheck_issue_ID
-common column: UpdatedBy
-common column: Updated
-common column: CreatedBy
-common column: Created
-common column: IsActive
-common column: AD_Org_ID
-common column: AD_Client_ID
Created = 2
(0021091)
iperdomo   
2009-10-15 19:14   
Checked @ rev 419cc2bd51fa