Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020363Openbravo ERPA. Platformpublic2012-04-26 16:442012-06-29 13:34
jecharri 
alostale 
highminoralways
closedfixed 
5
pi 
3.0MP133.0MP13 
Google Chrome
Core
No
0020363: If you put the table OBUIAPP_UIPersonalization as fully audited it does not work form or view personalization
If you put the table OBUIAPP_UIPersonalization as fully audited it does not work form or view personalization.
As "System Administrator" go to window "Windows,tabas and fields":
-select table "OBUIAPP_UIPersonalization" and check as "Fully Audited".
-run process "Update Audit Trail Infrastructure".

Login as "Group Admin":
-Go to window "Sales Invoice"
-Push in button "Form Personalization"
-Do some changes
-Push in "Save"
-You will seee the error:
Error occured: org.hibernate.exception.DataException: Could not execute JDBC batch update

I have attached the log

No tags attached.
related to defect 00197813.0MP10 closed migueldejuana Audit trail fails with tables having CLOB type columns (i.e. ad_process_request) 
has duplicate design defect 0019982 closed alostale Audit trail support for CLOB/Text 
related to defect 0020786 closed alostale int-full-pgsql 3674 fails 
txt log.txt (32,395) 2012-04-26 16:44
https://issues.openbravo.com/file_download.php?file_id=5174&type=bug
Issue History
2012-04-26 16:44jecharriNew Issue
2012-04-26 16:44jecharriAssigned To => alostale
2012-04-26 16:44jecharriFile Added: log.txt
2012-04-26 16:44jecharriWeb browser => Google Chrome
2012-04-26 16:44jecharriModules => Core
2012-04-26 16:44jecharriResolution time => 1342648800
2012-06-14 15:46alostaleRelationship addedrelated to 0019781
2012-06-14 15:46alostaleRelationship addedhas duplicate 0019982
2012-06-15 13:19alostaleNote Added: 0049852
2012-06-15 16:42hgbotCheckin
2012-06-15 16:42hgbotNote Added: 0049863
2012-06-15 16:42hgbotStatusnew => resolved
2012-06-15 16:42hgbotResolutionopen => fixed
2012-06-15 16:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/9dbe45c34ea50634cd2a1c02c60ad272e90faa78 [^]
2012-06-15 18:06alostaleRelationship addedrelated to 0020786
2012-06-15 18:15hgbotCheckin
2012-06-15 18:15hgbotNote Added: 0049871
2012-06-29 13:34AugustoMauchNote Added: 0050286
2012-06-29 13:34AugustoMauchStatusresolved => closed
2012-06-29 13:34AugustoMauchFixed in Version => 3.0MP13

Notes
(0049852)
alostale   
2012-06-15 13:19   
Known issue
===========

When using Oracle, the Audit Trail window cannot show in old and new value columns more than 4K characters. This is due to a limitation in Oracle to convert clob bigger than that to char. In this situation value is truncated and ... is appended. This does not happen in PostgreSQL so the whole value is shown.


Test Plan
=========

This fix affects audit trail infrastructure which is different between Oracle and PostgreSQL, to ensure no regression risk the following test cases have been executed in Oracle and PG:

-Enable audit trail for OBUIAPP_UIPersonalization
-Do modifications in window personalization and check in ad_audit_trail table value changes are stored in new *_Text columns
-Do modifications ensuring in DB the value is longer than 4K characters.
-Open audit popup (from Window Personalization window). Check modifications are properly displayed
-Open audit for deleted records. Check values are correctly displayed
-Open Audit Trail window and check these >4K char values are properly shown:
  -In Oracle they should be truncated and ... should be appeanded
  -In PostgreSQL the whole value should be shown.


Additional note
===============

This change forces to recreation of ad_audit_trail table when updating from a version not containing the fix to a newer one having it. In case of using audit trail, this table can have tons of records causing this update.database to be slower than usual (note it is only once, so subsequent updates will work normally).

It has been tested in a PG DB with ~4.5M audit records, taking about 13 minutes to complete update.database.

Workaround: it is possible to "help" dbsm to allow him not to recreate the table by adding these new columns manually in DB before starting update.database.
(0049863)
hgbot   
2012-06-15 16:42   
Repository: erp/devel/pi
Changeset: 9dbe45c34ea50634cd2a1c02c60ad272e90faa78
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jun 15 12:28:17 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/9dbe45c34ea50634cd2a1c02c60ad272e90faa78 [^]

fixed bug 20363: Implemented audit trail support for text/clob column type

---
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/model/tables/AD_AUDIT_TRAIL.xml
M src-db/database/model/views/AD_AUDIT_TRAIL_V.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/businessUtility/AuditTrailDeletedRecords.java
M src/org/openbravo/erpCommon/businessUtility/AuditTrailPopup.java
---
(0049871)
hgbot   
2012-06-15 18:15   
Repository: erp/devel/pi
Changeset: f42ba18ab26ba960c174b45d6293c691786d1b99
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jun 15 18:08:20 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f42ba18ab26ba960c174b45d6293c691786d1b99 [^]

fixed bug 20786, related to bug 20363: fixed build

  Moved ad_get_rdbsm funtion from post to presecript as now is used by a view

---
M src-db/database/model/postscript-Oracle.sql
M src-db/database/model/postscript-PostgreSql.sql
M src-db/database/model/prescript-Oracle.sql
M src-db/database/model/prescript-PostgreSql.sql
---
(0050286)
AugustoMauch   
2012-06-29 13:34   
Code reviewed and verified in pi@419121245486