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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038517
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2018-05-10 15:452018-05-28 16:08
ReporterjarmendarizView Statuspublic 
Assigned Tojarmendariz 
PrioritynormalResolutionfixedFixed in Version3.0PR18Q2
StatusclosedFix in branchFixed in SCM revision76d2f588a1c7
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

0038517: test11461 can fail when a Translation pack is installed.

DescriptionIssuesTest.test11461() creates a Form and a associated FormTrl object of which language is set to the first language retrieved by OBDal. If this language happens to be installed, save() will fail as the FormTrl object was already created when saving the Form object.
Steps To ReproduceIn a system with a Translation pack installed (e.g. es_ES), run IssuesTest.test11461() a number of times and it'll eventually fail.

But, to make it reproducible you can just change this line:
formTrl.setLanguage(OBDal.getInstance().createCriteria(Language.class).list().get(0));

with this one (assumming you've installed the es_ES translation pack):
formTrl.setLanguage(OBDal.getInstance().get(Language.class, "140"));

And run again the test.
Proposed SolutionChoose any language that is not installed. That is, any language which issystemlanguage is set to 'N'
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0104457)
hgbot (developer)
2018-05-10 16:35

Repository: erp/devel/pi
Changeset: 76d2f588a1c71192ba7ce77e2893d896685a58fa
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Thu May 10 16:03:18 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/76d2f588a1c71192ba7ce77e2893d896685a58fa [^]

Fixed issue 38517: Test fails sometimes when translation pack is installed.

Requesting the first language retrieved by OBDal with no criteria or order may
return a language that is already installed. This leads to an exception as the
FormTrl object was already created when saving Form and there cannot be 2 form
translations with the same associated Form ID and language.

---
M src-test/src/org/openbravo/test/dal/IssuesTest.java
---
(0104493)
hudsonbot (developer)
2018-05-14 13:09

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/ed385e0e027b [^]
Maturity status: Test
(0104715)
hgbot (developer)
2018-05-25 13:46

Repository: erp/devel/pi
Changeset: de341e9611c217acabef4125102266d35d14cc90
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri May 25 13:44:24 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/de341e9611c217acabef4125102266d35d14cc90 [^]

related to issue 38517: not need to load the list of languages in memory

---
M src-test/src/org/openbravo/test/dal/IssuesTest.java
---
(0104716)
caristu (developer)
2018-05-25 13:47

Code reviewed + tested OK.
(0104752)
hudsonbot (developer)
2018-05-28 16:08

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/816950756de8 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-05-10 15:45 jarmendariz New Issue
2018-05-10 15:45 jarmendariz Assigned To => platform
2018-05-10 15:45 jarmendariz Modules => Core
2018-05-10 15:45 jarmendariz Triggers an Emergency Pack => No
2018-05-10 15:45 jarmendariz Status new => scheduled
2018-05-10 16:35 hgbot Checkin
2018-05-10 16:35 hgbot Note Added: 0104457
2018-05-10 16:35 hgbot Status scheduled => resolved
2018-05-10 16:35 hgbot Resolution open => fixed
2018-05-10 16:35 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/76d2f588a1c71192ba7ce77e2893d896685a58fa [^]
2018-05-10 16:35 jarmendariz Assigned To platform => jarmendariz
2018-05-10 16:36 jarmendariz Review Assigned To => caristu
2018-05-14 13:09 hudsonbot Checkin
2018-05-14 13:09 hudsonbot Note Added: 0104493
2018-05-25 13:46 hgbot Checkin
2018-05-25 13:46 hgbot Note Added: 0104715
2018-05-25 13:47 caristu Note Added: 0104716
2018-05-25 13:47 caristu Status resolved => closed
2018-05-25 13:47 caristu Fixed in Version => 3.0PR18Q2
2018-05-28 16:08 hudsonbot Checkin
2018-05-28 16:08 hudsonbot Note Added: 0104752


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker