Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038829
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] A. Platformminorhave not tried2018-06-25 14:002018-08-03 13:07
ReportershuehnerView Statuspublic 
Assigned Tocaristu 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2.2
StatusclosedFix in branchFixed in SCM revision733a90ef96e2
ProjectionnoneETAnoneTarget Version3.0PR18Q2.2
OSAnyDatabasePostgreSQLJava version
OS VersionDatabase version10Ant version
Product VersionpiSCM revision763131a6ac15 
Review Assigned ToAugustoMauch
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038829: Some trigger error messages are not shown nicely when using PostgreSQL version 10 (shows part of technical error)

DescriptionWhen a database transaction throws an exception the ErrorTextParser class tries to parse it and translates it into a usable end-user message and shows that instead.

That parsing fails with pg10 and parts of the technical exception is shown mixed with the translated message.

When fixing the issue the existing unit tests (in ErrorTextParserTest class) for the parser should get a new test-case to cover the fix.
Steps To ReproduceStart with instance having 18Q3 (or at least pi containing those)
Important: Have project to 'reject setting a module in development' when instance purpose is 'Production'.

Change Role to System Administrator
Set instance purpose to 'Production'
Go to module window
Edit entry to 'core' module and mark 'In Development' as active.
Save the edited record.

Expected error message:
Saving failed. Cannot have modules in "In Development" status in a Production instance

Actual error message when using postgresql version10.
Saving failed. Cannot have modules in "In Development" status in a Production instance Where: PL/pgSQL function ad_module_trg() line 33 at RAISE

Here part of the 'Stacktrace' of the error message comes up in the translated text.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0038827 closedcaristu Some trigger error messages are not shown nicely when using PostgreSQL version 10 (shows part of technical error) 

-  Notes
(0106062)
hgbot (developer)
2018-07-31 19:19

Repository: erp/backports/3.0PR18Q2.2
Changeset: 733a90ef96e2a09a4e41fbc343a7ec15f502f8a6
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Jul 31 19:16:40 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.2/rev/733a90ef96e2a09a4e41fbc343a7ec15f502f8a6 [^]

fixes issue 38829: Some trigger error messages not shown nicely in PG10

  Using capturing groups to retrieve just the DB message (it is surrounded by @) with the regular expression matcher.

---
M src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
---
(0106120)
hgbot (developer)
2018-08-02 13:33

Repository: erp/backports/3.0PR18Q2.2
Changeset: b268ab48035d919981f21eee0f3661b6661be04d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Aug 02 13:03:20 2018 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR18Q2.2/rev/b268ab48035d919981f21eee0f3661b6661be04d [^]

related to bug 38829: Some trigger error messages not shown nicely in PG10

  The fix[1] was not taking into accout the possibility of having multiple translatable elements (text surrounded by @) in the same error message.

  Therefore, it has been restored the previous regular expression, and we are now directly stripping the part that contains the technical information of a trigger failure from the DB message returned by PostgreSQL.

[1] https://code.openbravo.com/erp/backports/3.0PR18Q2.2/rev/733a90ef96e2a09a4e41fbc343a7ec15f502f8a6 [^]

---
M src/org/openbravo/erpCommon/utility/ErrorTextParserPOSTGRE.java
---

- Issue History
Date Modified Username Field Change
2018-06-25 15:18 caristu Type defect => backport
2018-06-25 15:18 caristu Target Version => 3.0PR18Q2.2
2018-06-26 18:02 caristu Assigned To platform => caristu
2018-07-31 19:18 caristu Review Assigned To => AugustoMauch
2018-07-31 19:19 hgbot Checkin
2018-07-31 19:19 hgbot Note Added: 0106062
2018-07-31 19:19 hgbot Status scheduled => resolved
2018-07-31 19:19 hgbot Resolution open => fixed
2018-07-31 19:19 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q2.2/rev/733a90ef96e2a09a4e41fbc343a7ec15f502f8a6 [^]
2018-08-02 13:33 hgbot Checkin
2018-08-02 13:33 hgbot Note Added: 0106120
2018-08-03 13:07 AugustoMauch Status resolved => closed
2018-08-03 13:07 AugustoMauch Fixed in Version => 3.0PR18Q2.2


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker