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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046245
TypeCategorySeverityReproducibilityDate SubmittedLast Update
feature request[Openbravo ERP] Y. DBSourceManagermajorhave not tried2021-04-11 10:482021-06-04 11:47
ReporterAugustoMauchView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
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

0046245: Support including source data of optional dependencies in dual modules

DescriptionUntil now dual modules were allowed to contain frontend code for both org.openbravo.mobile.core and org.openbravo.core2 applications. Now it has been requested that these modules are able to contain also source data of org.openbravo.core2 application so that:
- Running update.database in an environment where org.openbravo.core2 is not installed is supported
- When running export.database afterwards does not delete the org.openbravo.core2 sourcedata that was missing from the database
Steps To Reproduce-
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
causes defect 0046974 closedAugustoMauch POS2 cannot export user action 

-  Notes
(0127206)
hgbot (developer)
2021-04-11 10:57

Merge Request created: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/22 [^]
(0127242)
hgbot (developer)
2021-04-13 09:13

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: 79e714ac70dc8e2de9b1d5e022ee6c181965f9a4
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-04-12T12:15:29+02:00
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/79e714ac70dc8e2de9b1d5e022ee6c181965f9a4 [^]

Fixes ISSUE-46245: sourcedata and sampledata of uninstalled optional modules is not removed

Now dual modules can have sourcedata and sampledata of tables that belong to optional modules (i.e. org.openbravo.core2, OBC2 dbprefix).

When running update.database the sourcedata will just not be installed (no change needed for this), and then when running
export.database, the OBC2 source data will not be removed even though it was missing from the database.

When importing the sampledata, those of tables that belong to uninstalled optional modules will not be imported, and when running
export.sample.data afterwards, those files will not be deleted.

The change has been done so that it is easy to support more optional modules (i.e. org.openbravo.pos2).

---
M src/org/openbravo/ddlutils/task/ExportDatabase.java
M src/org/openbravo/ddlutils/task/ExportSampledata.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0127243)
hgbot (developer)
2021-04-13 09:13

Merge request merged: https://gitlab.com/openbravo/product/dbsm/-/merge_requests/22 [^]
(0127245)
hgbot (developer)
2021-04-13 09:18

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/346 [^]
(0127246)
hgbot (developer)
2021-04-13 09:19

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/346 [^]
(0127247)
hgbot (developer)
2021-04-13 09:19

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: ebf31272adf81910f2aca44189f82c56f50f11d2
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 2021-04-13T09:17:19+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/ebf31272adf81910f2aca44189f82c56f50f11d2 [^]

Fixes ISSUE-46245: sourcedata and sampledata of uninstalled optional modules is not removed

Now dual modules can have sourcedata and sampledata of tables that belong to optional modules (i.e. org.openbravo.core2, OBC2 dbprefix).

When running update.database the sourcedata will just not be installed (no change needed for this), and then when running
export.database, the OBC2 source data will not be removed even though it was missing from the database.

When importing the sampledata, those of tables that belong to uninstalled optional modules will not be imported, and when running
export.sample.data afterwards, those files will not be deleted.

The change has been done so that it is easy to support more optional modules (i.e. org.openbravo.pos2).

---
M src-db/database/lib/dbsourcemanager.jar
---
(0129060)
hgbot (developer)
2021-06-04 10:53

Repository: https://gitlab.com/openbravo/product/dbsm [^]
Changeset: a29a08bfe127cdd7d3d8db50ff3d9511cc98d369
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-06-04T08:52:28+00:00
URL: https://gitlab.com/openbravo/product/dbsm/-/commit/a29a08bfe127cdd7d3d8db50ff3d9511cc98d369 [^]

fixes BUG-46974: cannot export data of tables from core2

Source data in core2 AD tables was not exported. ISSUE-46245 skips
export of these tables in case the module that defines them is not
installed.

When exporting source data it was not working because it incorrectly
dected core2 to be always not installed. It relied on
DBSMOBUtil.allModules to be correctly completelly initialized which is
not the case after calling getSortedTemplates.

Now the optional modules not installed are initialized in getModules and
kept after getSortedTemplates. belongsToOptionalUninstalledModule method
must be invoked after getModules, now if called before it will
explicitily fail.

---
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0129065)
hgbot (developer)
2021-06-04 11:47

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 870040145e6772c5c7a8a689055a6f6f2d53775a
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 2021-06-04T10:55:51+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/870040145e6772c5c7a8a689055a6f6f2d53775a [^]

fixes BUG-46974: core2 tables export; fixes BUG-46647: sampledata defaults

dbsm including the fixes for:

BUG-46974: cannot export data of tables from core2

  Source data in core2 AD tables was not exported. ISSUE-46245 skips
  export of these tables in case the module that defines them is not
  installed.

  When exporting source data it was not working because it incorrectly
  dected core2 to be always not installed. It relied on
  DBSMOBUtil.allModules to be correctly completelly initialized which is
  not the case after calling getSortedTemplates.

  Now the optional modules not installed are initialized in getModules and
  kept after getSortedTemplates. belongsToOptionalUninstalledModule method
  must be invoked after getModules, now if called before it will
  explicitily fail.

BUG-46647: no default applied when inserting sample data

  When inserting sample data neither default or on create default were
  applied. This made more difficult to import sample data in an instance
  with a different set of modules than the ones used to generate it.

  Now when trying to import sample data with null values in mandatory columns
  the following is applied:

   * If there is an on create default literal value it gets applied. Note on
     create default based on subqueries cannot be applied.
   * If there is no create default, default value gets applied.

---
M src-db/database/lib/dbsourcemanager.jar
---

- Issue History
Date Modified Username Field Change
2021-04-11 10:48 AugustoMauch New Issue
2021-04-11 10:48 AugustoMauch Assigned To => platform
2021-04-11 10:48 AugustoMauch Modules => Core
2021-04-11 10:48 AugustoMauch Triggers an Emergency Pack => No
2021-04-11 10:57 hgbot Note Added: 0127206
2021-04-11 17:49 AugustoMauch Status new => scheduled
2021-04-13 09:13 hgbot Resolution open => fixed
2021-04-13 09:13 hgbot Status scheduled => closed
2021-04-13 09:13 hgbot Note Added: 0127242
2021-04-13 09:13 hgbot Note Added: 0127243
2021-04-13 09:18 hgbot Note Added: 0127245
2021-04-13 09:19 hgbot Note Added: 0127246
2021-04-13 09:19 hgbot Fixed in Version => PR21Q3
2021-04-13 09:19 hgbot Note Added: 0127247
2021-06-03 10:17 alostale Relationship added causes 0046974
2021-06-04 10:53 hgbot Note Added: 0129060
2021-06-04 11:47 hgbot Note Added: 0129065


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker