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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039614
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorrandom2018-11-13 08:592018-12-11 20:22
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in Version3.0PR19Q1
StatusclosedFix in branchFixed in SCM revision6323b569fcbb
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039614: random unique constraint violation message

DescriptionWhen a database unique constraint is violated, Openbravo produces a user readable message indicating for the table where the constraint is which are the columns that must be unique.

This message can sometimes not be accurate because the names columns are randomly picked from any element (AD_Element) with that same column name.
Steps To Reproduce1. Execute org.openbravo.test.system.ErrorTextParserIntegrationTest.testUniqueSingleField()
  -> Randomly it can fail with:
org.junit.ComparisonFailure: expected:<...lient with the same [Name.] Name must be unique...> but was:<...lient with the same [Commercial Name. Commercial] Name must be unique...>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at org.openbravo.test.system.ErrorTextParserIntegrationTest.doErrorTextParserTest(ErrorTextParserIntegrationTest.java:196)
    at org.openbravo.test.system.ErrorTextParserIntegrationTest.testUniqueSingleField(ErrorTextParserIntegrationTest.java:70)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
    at org.junit.rules.RunRules.evaluate(RunRules.java:20)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)


  
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0107870)
hgbot (developer)
2018-11-13 09:54

Repository: erp/devel/pi
Changeset: 6323b569fcbb097b412b21ca26e8b8530434c1f0
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Nov 13 09:24:05 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6323b569fcbb097b412b21ca26e8b8530434c1f0 [^]

fixed bug 39614: random unique constraint violation message

  Get name to generate error message from actual element associated to the column
  in the table we are looking for instead of getting it from any element with that
  same name assuming it is unique.

---
M src/org/openbravo/erpCommon/utility/ErrorTextParser.java
M src/org/openbravo/erpCommon/utility/ErrorTextParserORACLE.java
M src/org/openbravo/erpCommon/utility/ErrorTextParser_data.xsql
---
(0108122)
caristu (developer)
2018-11-27 12:17

Reviewed
(0108462)
hudsonbot (developer)
2018-12-11 20:22

A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/470e3cd384c5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-11-13 08:59 alostale New Issue
2018-11-13 08:59 alostale Assigned To => platform
2018-11-13 08:59 alostale Modules => Core
2018-11-13 08:59 alostale Triggers an Emergency Pack => No
2018-11-13 09:44 alostale Assigned To platform => alostale
2018-11-13 09:44 alostale Status new => acknowledged
2018-11-13 09:44 alostale Review Assigned To => caristu
2018-11-13 09:54 hgbot Checkin
2018-11-13 09:54 hgbot Note Added: 0107870
2018-11-13 09:54 hgbot Status acknowledged => resolved
2018-11-13 09:54 hgbot Resolution open => fixed
2018-11-13 09:54 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6323b569fcbb097b412b21ca26e8b8530434c1f0 [^]
2018-11-27 12:17 caristu Note Added: 0108122
2018-11-27 12:17 caristu Status resolved => closed
2018-11-27 12:17 caristu Fixed in Version => 3.0PR19Q1
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108462


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker