Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030489Openbravo ERPA. Platformpublic2015-08-04 10:072017-09-22 10:10
migueldejuana 
inigosanchez 
normalminoralways
closedfixed 
20
pi 
3.0PR17Q4 
alostale
Core
No
0030489: configScript(retail.pack) seems not applied when doing install.source
In an enviroment with Web POS. When I do an install.source and then, I try to export.database, I get this error:

BUILD FAILED
/home/openbravo/workspaces/openbravo/erp/devel/pi/webposPack/build.xml:771: The following error occurred while executing this line:
/home/openbravo/workspaces/openbravo/erp/devel/pi/webposPack/src-db/database/build.xml:157: Reversing the change [AD_TAB.ISACTIVE <N->Y> PK: 800222] in configuration script for template org.openbravo.retail.pack couldn't be applied, and therefore, the export.database couldn't be completed. Fix (or remove) the configuration script, and then try the export again.


But, if I do an install.source and then update.database, I don't get the error.

I saw in the database that after install.source, for PK: 800222, AD_TAB.ISACTIVE was 'N' and after update.database AD_TAB.ISACTIVE was 'Y'.
- Install retail modules
- install.source
- Put Core, mobile.core, retail.posterminal in development
- export.database
ERROR
No tags attached.
related to defect 00120072.50MP11 closed marvintm When having several nested Templates, configuration scripts can be executed in wrong order 
has duplicate defect 0028846 closed alostale You can not export database with core in development 
related to defect 0036137 closed inigosanchez [SER-QA 2918] Config script removeCheckChange are not applied on install.source 
related to defect 0036876 closed inigosanchez Some methods in DBSMOBUtil class are not used anymore. 
Issue History
2015-08-04 10:07migueldejuanaNew Issue
2015-08-04 10:07migueldejuanaAssigned To => platform
2015-08-04 10:07migueldejuanaModules => Core
2015-08-04 10:07migueldejuanaTriggers an Emergency Pack => No
2015-08-04 10:22alostaleRelationship addedrelated to 0028846
2015-08-04 10:45migueldejuanaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=9144#r9144
2015-08-04 10:58alostaleStatusnew => acknowledged
2015-08-04 10:58alostaleRelationship replacedhas duplicate 0028846
2017-09-07 12:37alostaleRelationship addedrelated to 0036137
2017-09-18 11:48inigosanchezAssigned Toplatform => inigosanchez
2017-09-18 11:48inigosanchezStatusacknowledged => scheduled
2017-09-18 11:48inigosanchezRelationship addedrelated to 0012007
2017-09-18 13:25inigosanchezRelationship addedrelated to 0036876
2017-09-18 13:36inigosanchezNote Added: 0099107
2017-09-19 09:59inigosanchezReview Assigned To => alostale
2017-09-19 10:09hgbotCheckin
2017-09-19 10:09hgbotNote Added: 0099135
2017-09-19 10:09hgbotStatusscheduled => resolved
2017-09-19 10:09hgbotResolutionopen => fixed
2017-09-19 10:09hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/dbsm-main/rev/8d6dbb0556036d8f6a667a1cf433a309e1536def [^]
2017-09-19 10:11hgbotCheckin
2017-09-19 10:11hgbotNote Added: 0099136
2017-09-19 10:11hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/dbsm-main/rev/8d6dbb0556036d8f6a667a1cf433a309e1536def [^] => http://code.openbravo.com/erp/devel/pi/rev/3e1419720b7af8072a58907bcb588a6bb42a32c9 [^]
2017-09-21 16:50hudsonbotCheckin
2017-09-21 16:50hudsonbotNote Added: 0099414
2017-09-22 10:10alostaleNote Added: 0099461
2017-09-22 10:10alostaleStatusresolved => closed
2017-09-22 10:10alostaleFixed in Version => 3.0PR17Q4

Notes
(0099107)
inigosanchez   
2017-09-18 13:36   
When this fix will be introduce into the distribution, some methods should be removed or deprecated in DBSMOBUtil class because it is not used anymore:
- public void generateIndustryTemplateTree() {
- private void recursiveTemplateLoader(String idDepTemplate) {
* It should be checked other potential candidates related with the issue.

One of them are public and for this reason, this issue should be posppone to take into account into the code (DBSM sources) clean up task. See issue 0036876
(0099135)
hgbot   
2017-09-19 10:09   
Repository: erp/devel/dbsm-main
Changeset: 8d6dbb0556036d8f6a667a1cf433a309e1536def
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Sep 19 09:50:23 2017 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/8d6dbb0556036d8f6a667a1cf433a309e1536def [^]

Fixed issue 30489: Templates hierarchy are not applied as expected

The problem was that hierarchy was calculated wrongly when it should be applied the
configScript files. The generateTemplatesTree generate a wrongly list of templates
in terms of sorting. It means that templates were properly located but applied in
the wrong order.

In order to fix this problem, getSortedTemplates method is used to retrieves the
sorted template list. Now, the configScript files are applied properly, it means,
the hierarchy is applied as expected. For example, the changes defined in the
configScript file of the retail pack are applied after the core ones.

---
M src/org/openbravo/ddlutils/task/CreateDatabase.java
---
(0099136)
hgbot   
2017-09-19 10:11   
Repository: erp/devel/pi
Changeset: 3e1419720b7af8072a58907bcb588a6bb42a32c9
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Sep 19 10:10:32 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3e1419720b7af8072a58907bcb588a6bb42a32c9 [^]

Fixed issue 30489: Templates hierarchy are not applied as expected

The problem was that hierarchy was calculated wrongly when it should be applied the
configScript files. The generateTemplatesTree generate a wrongly list of templates
in terms of sorting. It means that templates were properly located but applied in
the wrong order.

In order to fix this problem, getSortedTemplates method is used to retrieves the
sorted template list. Now, the configScript files are applied properly, it means,
the hierarchy is applied as expected. For example, the changes defined in the
configScript file of the retail pack are applied after the core ones.

---
M src-db/database/lib/dbsourcemanager.jar
---
(0099414)
hudsonbot   
2017-09-21 16:50   
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/9750b78d3e5c [^]
Maturity status: Test
(0099461)
alostale   
2017-09-22 10:10   
reviewed + tested