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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0020345
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-04-25 10:332012-05-28 08:55
ReporterAugustoMauchView Statuspublic 
Assigned ToAugustoMauch 
PriorityhighResolutionfixedFixed in Version3.0MP12
StatusclosedFix in branchFixed in SCM revisione260a84b287f
ProjectionnoneETAnoneTarget Version3.0MP12
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0020345: Verify Language process is creating more records than needed

DescriptionThe Verify Language process should create translation records for all the system languages, but not if language of the message to be translated is the same as its module language.

Example:
- System languages: English, Spanish
- The language of the messages in AD_Message that belong to the Core module is English, so it will not need and English translation.
- Right now, if the Verify Language process is executed, it will create both Spanish and English translations for all the messages of Core.
Steps To Reproduce- Login as System Administrator
- Open the Message window
- Add a new message to the core module.
- Check that no English translation was automatically created for the message.
- Open the Language window
- Open the Spanish (Spain) record, check it as System Language, and execute the Verify Language process.
- Check that two translations have been added to the previously created message: one for Spanish (correct) and one for English (wrong)
Proposed Solution- Modify the Verify Language process so that it does not add wrong translations
- Create a configuration script to delete all the wrong traslations that have been created in the past.
TagsNo tags attached.
Attached Filesdiff file icon issue20345.diff [^] (20,327 bytes) 2012-04-27 14:19 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0013627pi acknowledgedAugustoMauch verify languages process shouldn't populate c_tax_trl table 
related to defect 00208903.0MP12 closedAugustoMauch The update.database process of MP12 deletes some translations of the messages 

-  Notes
(0048336)
hgbot (developer)
2012-05-03 15:59

Repository: erp/devel/pi
Changeset: 303dc1728c72bccac5be5f0df86590bd17348e0f
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 03 15:58:38 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/303dc1728c72bccac5be5f0df86590bd17348e0f [^]

Fixes issue 20345: Verify Language process is creating more records than needed

This fix prevents the Verify Language process from creating automatically redundant traslation (module language = translation language).

It also includes a module script to delete the redundant translations that have been irregularly created.

---
M src-db/database/model/functions/AD_LANGUAGE_CREATE.xml
A src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteRedundantTranslations.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/DeleteRedundantTranslationsData.class
A src-util/modulescript/src/org/openbravo/modulescript/DeleteRedundantTranslations.java
A src-util/modulescript/src/org/openbravo/modulescript/DeleteRedundantTranslations_data.xsql
---
(0048340)
AugustoMauch (manager)
2012-05-03 16:03

The Verify Language will no longer add to ad_message_trl translation in the same language as the ad_message module, neither english translations to c_country_trl, c_currency_trl, c_doctype_trl, c_elementvalue_trl, c_greeting_trl, c_payment_term_trl, c_taxcategory_trl, c_tax_trl and c_uom_trl.

The module script will only delete the redundant translations from ad_message.
(0048341)
AugustoMauch (manager)
2012-05-03 16:03

This is not a risky change.
(0048342)
AugustoMauch (manager)
2012-05-03 16:07

Test plan:
- Login as System Admin
- Open the Language window
- Check Spanish (Spain) as System Language, and save.
- Open the Message window.
- Create a new Message (use core or any module in English). When the message is saved it should automatically add a Spanish traslation.
- Open the Language window again
- Check Catalan (Spain) as System Language.
- Run the Verify Languages process
- Open the previously created message. A new translation in Catalan should have been created. No English translation should have been created.
(0048343)
AugustoMauch (manager)
2012-05-03 16:08

Test plan (module script):
- Check that no messages from English modules have a translation in English.
(0048359)
hgbot (developer)
2012-05-03 18:41

Repository: erp/devel/pi
Changeset: bf22dabdd58c46c9342d5d9761d95bb7c1a234a0
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu May 03 18:40:23 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/bf22dabdd58c46c9342d5d9761d95bb7c1a234a0 [^]

Related to issue 20345: Test provisionally ignored

A test is being ignored because it needed and English translation of a month in the c_month_trl table. When another two part unique constrait is found, the test will be used again

---
M src-test/org/openbravo/test/system/ErrorTextParserTest.java
---
(0048682)
alostale (manager)
2012-05-16 09:39
edited on: 2012-05-16 09:40

Reopening due to code review:
-When calculating core's language, don't use module name but id, as name might change.
-Don't query each time for core's language as it is constant, query once and keep it in a variable.
-Update year in license

(0048692)
hgbot (developer)
2012-05-16 12:37

Repository: erp/devel/pi
Changeset: e260a84b287f1ea62ca73d6955f378c549708037
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Wed May 16 12:36:15 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e260a84b287f1ea62ca73d6955f378c549708037 [^]

Fixes issue 20345: Code review changes applied

Now the field used to retrieve the language of the core module is ad_module_id (0) instead of name ('Core', it may vary in the future). Instead of executing the consult every time the language is needed, it is executed once and the returned value is saved in a variable.
The year in the license has been updated.

---
M src-db/database/model/functions/AD_LANGUAGE_CREATE.xml
---
(0049010)
hudsonbot (developer)
2012-05-25 12: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/5401e185a8b0 [^]

Maturity status: Test
(0049018)
hudsonbot (developer)
2012-05-25 12: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/5401e185a8b0 [^]

Maturity status: Test
(0049144)
hudsonbot (developer)
2012-05-25 12:12

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/5401e185a8b0 [^]

Maturity status: Test
(0049317)
alostale (manager)
2012-05-28 08:55

code reviewed and verified on pi@87f24231e3f1

- Issue History
Date Modified Username Field Change
2012-04-25 10:33 AugustoMauch New Issue
2012-04-25 10:33 AugustoMauch Assigned To => AugustoMauch
2012-04-25 10:33 AugustoMauch Modules => Core
2012-04-26 13:07 alostale Relationship added related to 0013627
2012-04-27 14:19 AugustoMauch File Added: issue20345.diff
2012-05-03 15:59 hgbot Checkin
2012-05-03 15:59 hgbot Note Added: 0048336
2012-05-03 15:59 hgbot Status new => resolved
2012-05-03 15:59 hgbot Resolution open => fixed
2012-05-03 15:59 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/303dc1728c72bccac5be5f0df86590bd17348e0f [^]
2012-05-03 16:03 AugustoMauch Note Added: 0048340
2012-05-03 16:03 AugustoMauch Note Added: 0048341
2012-05-03 16:07 AugustoMauch Note Added: 0048342
2012-05-03 16:08 AugustoMauch Note Added: 0048343
2012-05-03 18:41 hgbot Checkin
2012-05-03 18:41 hgbot Note Added: 0048359
2012-05-16 09:39 alostale Note Added: 0048682
2012-05-16 09:39 alostale Status resolved => new
2012-05-16 09:39 alostale Resolution fixed => open
2012-05-16 09:40 alostale Note Edited: 0048682 View Revisions
2012-05-16 12:37 hgbot Checkin
2012-05-16 12:37 hgbot Note Added: 0048692
2012-05-16 12:37 hgbot Status new => resolved
2012-05-16 12:37 hgbot Resolution open => fixed
2012-05-16 12:37 hgbot Fixed in SCM revision http://code.openbravo.com/erp/devel/pi/rev/303dc1728c72bccac5be5f0df86590bd17348e0f [^] => http://code.openbravo.com/erp/devel/pi/rev/e260a84b287f1ea62ca73d6955f378c549708037 [^]
2012-05-25 12:09 hudsonbot Checkin
2012-05-25 12:09 hudsonbot Note Added: 0049010
2012-05-25 12:09 hudsonbot Checkin
2012-05-25 12:09 hudsonbot Note Added: 0049018
2012-05-25 12:12 hudsonbot Checkin
2012-05-25 12:12 hudsonbot Note Added: 0049144
2012-05-28 08:55 alostale Note Added: 0049317
2012-05-28 08:55 alostale Status resolved => closed
2012-05-28 08:55 alostale Fixed in Version => 3.0MP12
2012-06-28 17:24 AugustoMauch Relationship added related to 0020890


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker