Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0017630Openbravo ERPA. Platformpublic2009-12-01 13:352011-07-15 18:23
marvintm 
shuehner 
urgentminorhave not tried
closedfixed 
5
 
2.50MP32 
Core
No
0017630: Constraint error text parser on Postgres doesn't work with Spanish translated PostgreSQL
The constraint error text parser doesn't work on Spanish translated PostgreSQL. For example, this error message is not parsed correctly:

ERROR: llave duplicada viola restricción de unicidad «ad_message_value_un»

The problem is the different quotes that the Spanish message uses: "<< >>".
Just add a new message entry in the application, in Postgre. The standard constraint error will be shown, instead of the Openbravo customized, "nice" one.
No tags attached.
blocks defect 00115723.0MP2 closed shuehner Constraint error text parser on Postgres doesn't work with Spanish translated PostgreSQL 
Issue History
2011-06-13 18:33shuehnerTypedefect => backport
2011-06-13 18:33shuehnerfix_in_branch => 2.50
2011-06-13 18:33shuehnerTarget Version3.0MP2 => 2.50MP32
2011-07-15 11:54hgbotCheckin
2011-07-15 11:54hgbotNote Added: 0039086
2011-07-15 11:54hgbotStatusscheduled => resolved
2011-07-15 11:54hgbotResolutionopen => fixed
2011-07-15 11:54hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/56dc0ea113749daae8f0c44b54e13373d4b85f20 [^]
2011-07-15 18:23marvintmStatusresolved => closed

Notes
(0039086)
hgbot   
2011-07-15 11:54   
Repository: erp/stable/2.50
Changeset: 56dc0ea113749daae8f0c44b54e13373d4b85f20
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Fri Jul 15 11:53:47 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/56dc0ea113749daae8f0c44b54e13373d4b85f20 [^]

Fixed 17630 Allow «» also as separators when searching for constraint name
Spanish translation of pgsql error messages uses «» instead of "" as quotes
around the columnname. Add that case to error text parser for postgres to be
able to find the constraint name and show a nicer error message. Also add
unit test for this. As language config of db is normally not in spanish that
added test just passes in known string into errror text-parser and does not
really test db-action vs. expected message like the other testcases.

---
M src-test/org/openbravo/test/system/ErrorTextParserTest.java
M src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
---