Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0010246Openbravo ERP09. Financial managementpublic2009-08-12 10:322009-08-19 00:00
mgerke 
vinothbabu 
urgentmajoralways
closedfixed 
20rPath Linux
2.50MP2 
pi 
Core
No
0010246: missing unique constraint on c_elemenvalue.value
In 2.50 MP1 there was a unique constraint on c_elemenvalue.value

In MP2 it was proposed to delete the unique constraint and add an unique index, see
http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/Database_Model/org.openbravo.model.financialmgmt.accounting.coa/C_ElementValue#Indexes [^]
and
//www.mail-archive.com/openbravo-commits@lists.sourceforge.net/msg03514.html">http://www.mail-archive.com/openbravo-commits@lists.sourceforge.net/msg03514.html [//www.mail-archive.com/openbravo-commits@lists.sourceforge.net/msg03514.html" target="_blank">^]

The unique constraint was deleted, but the unique index was not inserted

Now it is possible to insert 2 or more accounts with the same value (=searchkey). This behavior violates the accounting rules e.g. in Germany.
see DB with pgAdmin or C_ELEMENTVALUE.xml

Add the unique index
No tags attached.
related to defect 0010313 closed vinothbabu API check build 112 fails - part2 
Issue History
2009-08-12 10:32mgerkeNew Issue
2009-08-12 10:32mgerkeAssigned To => rafaroda
2009-08-13 13:28rafarodaNote Added: 0018934
2009-08-13 13:28rafarodaAssigned Torafaroda => vinothbabu
2009-08-13 13:28rafarodaPrioritynormal => urgent
2009-08-13 13:28rafarodaSeveritycritical => major
2009-08-13 13:28rafarodaStatusnew => scheduled
2009-08-13 18:54hgbotCheckin
2009-08-13 18:54hgbotNote Added: 0018938
2009-08-13 18:54hgbotStatusscheduled => resolved
2009-08-13 18:54hgbotResolutionopen => fixed
2009-08-13 18:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0711d379842ee1f28f4a05a1c34632bf6f7861f5 [^]
2009-08-18 09:09sureshbabuStatusresolved => closed
2009-08-18 09:09sureshbabuNote Added: 0018988
2009-08-18 09:09sureshbabuFixed in Version => pi
2009-08-18 15:06rafarodaRelationship addedrelated to 0010313
2009-08-19 00:00anonymoussf_bug_id0 => 2839904

Notes
(0018934)
rafaroda   
2009-08-13 13:28   
Vinoth,

Can you please take action on this issue? Was the constraint deleted by some particular reason? https://code.openbravo.com/erp/devel/pi/diff/3cb40e9246fc/src-db/database/model/tables/C_ELEMENTVALUE.xml [^]

Has it to be re-placed by another constraint? https://code.openbravo.com/erp/devel/pi/rev/3cb40e9246fc [^]

Thanks.
(0018938)
hgbot   
2009-08-13 18:54   
Repository: erp/devel/pi
Changeset: 0711d379842ee1f28f4a05a1c34632bf6f7861f5
Author: Vinoth Babu <vinoth.babu <at> openbravo.com>
Date: Thu Aug 13 22:22:50 2009 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/0711d379842ee1f28f4a05a1c34632bf6f7861f5 [^]

Fixes bug 10246 Missing unique constraint on c_elemenvalue.value

---
M src-db/database/model/tables/C_ELEMENTVALUE.xml
---
(0018988)
sureshbabu   
2009-08-18 09:09   
Closing this issue since i am not able to reproduce this issue (Informed to Pablo Lujan)