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

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

0039531: Generated JS can be different from SS to CS due to a missing orderBy in Component Provider structure

DescriptionGenerated JS can be different from SS to CS due to a missing orderBy in Component Provider structure.
It may happen when modules have same dependencies and the query does not order it.

In the case different JS files are generated a popup saying "your application has changed" will rise and will require to logout. If you login again same popup will rise.
Steps To Reproduce1) Apply the patch: sortAscending.diff. This patch retrieves the modules to calculate their dependencies in ascending order by ID. Rebuild the application.
2) Login in Openbravo.
3) Check the name of the JS file containing the static resources in web/js/gen
4) Revert the patch applied in 1)
5) Apply the patch: sortDescending.diff. This patch retrieves the modules to calculate their dependencies in descending order by ID. Rebuild the application.
6) Login in Openbravo.
7) Check the name of the JS file and notice that is different from the name in step 3) although the static resources have not been modified.
Proposed SolutionIn KernelUtils.getModulesOrderedByDependency(), retrieve the modules from DB using a fixed sorting criteria.
TagsNo tags attached.
Attached Filesdiff file icon sortAscending.diff [^] (1,071 bytes) 2018-10-24 17:34 [Show Content]
diff file icon sortDescending.diff [^] (1,072 bytes) 2018-10-24 17:34 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0107554)
hgbot (developer)
2018-10-24 17:50

Repository: erp/devel/pi
Changeset: 69d55ed0f71cde21030a141595a68e129cf25898
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Oct 24 17:50:25 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/69d55ed0f71cde21030a141595a68e129cf25898 [^]

fixes issue 39531: getModulesOrderedByDependency() result is not deterministic

  The JS file containing the static resources is generated by processing them in the order defined by the position of their corresponding modules in the list returned by the KernelUtils.getModulesOrderedByDependency() method. The module sorting is calculated in Java, but it also depends on the order used when retrieving the module information from database.

  As there was not a fixed order to retrieve the modules, the result of the method was not deterministic, which could lead to generate a different JS file with the static resources although they were not being modified.

  To fix the problem we are now retrieving the modules from database with a fixed sorting in the getModulesOrderedByDependency() method.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
(0107555)
hgbot (developer)
2018-10-24 17:56

Repository: erp/devel/pi
Changeset: 4a141858f055a88573c3dc352c08d97173ac08a0
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Oct 24 17:56:17 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4a141858f055a88573c3dc352c08d97173ac08a0 [^]

related to issue 39531: add log info

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
(0107608)
alostale (manager)
2018-10-26 08:48

reviewed
(0108441)
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
(0108442)
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-10-24 13:41 guillermogil New Issue
2018-10-24 13:41 guillermogil Assigned To => platform
2018-10-24 13:41 guillermogil Modules => Core
2018-10-24 13:41 guillermogil Triggers an Emergency Pack => No
2018-10-24 13:43 guillermogil File Added: fixDifferentVersionMultiServer.diff
2018-10-24 16:21 guillermogil Description Updated View Revisions
2018-10-24 17:32 caristu Steps to Reproduce Updated View Revisions
2018-10-24 17:33 caristu Assigned To platform => caristu
2018-10-24 17:34 caristu File Added: sortAscending.diff
2018-10-24 17:34 caristu File Added: sortDescending.diff
2018-10-24 17:34 caristu File Deleted: fixDifferentVersionMultiServer.diff
2018-10-24 17:35 caristu Proposed Solution updated
2018-10-24 17:50 hgbot Checkin
2018-10-24 17:50 hgbot Note Added: 0107554
2018-10-24 17:50 hgbot Status new => resolved
2018-10-24 17:50 hgbot Resolution open => fixed
2018-10-24 17:50 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/69d55ed0f71cde21030a141595a68e129cf25898 [^]
2018-10-24 17:51 caristu Review Assigned To => alostale
2018-10-24 17:56 hgbot Checkin
2018-10-24 17:56 hgbot Note Added: 0107555
2018-10-26 08:48 alostale Note Added: 0107608
2018-10-26 08:48 alostale Status resolved => closed
2018-10-26 08:48 alostale Fixed in Version => 3.0PR19Q1
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108441
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108442


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker