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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0046111
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Openbravo ERP] 02. Master data managementmajoralways2021-02-22 20:212021-03-29 15:07
ReporterlbressanView Statuspublic 
Assigned Toranjith_qualiantech_com 
PriorityhighResolutionfixedFixed in VersionPR21Q1.1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q1.1
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionPR20Q4.1SCM revision 
Review Assigned Tomarvintm
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0046111: Errors when migrating brands to product characteristics when upgrading to 20Q4.1

DescriptionWhen you want to migrate to the latest version of OB 20Q4.1, the Marks migration module script fails: "ConvertBrandIntoCharacteristic.java". Note that the environment does not have the "org.openbravo.retail.sampledata" module installed. Then the error message is as follows:
"[java] 52337 [main] ERROR org.openbravo.retail.posterminal.modulescript. ConvertBrandIntoCharacteristicData - SQL error in query: INSERT INTO m_characteristic( m_characteristic_id, ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, description, ad_tree_id, isvariant, isexplodeconf, em_obpos_filteronwebpos, em_obpos_useonwebpos) VALUES (? , ?,'0', 'Y', now(), '100', now(), '100', 'Brand', null, '899D83A7B7E24F57911A91AE82DCA496','N', 'Y', 'Y', 'Y', 'Y') :org.postgresql.util.PSQLException: ERROR: insert or update on table "m_characteristic" violates foreign key "m_product_tree"
[java] Detail: key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) is not present in table "ad_tree".
java] 52340 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic - Errors converting brand into characteristic".

This is because the (ad_tree_id)=899D83A7B7E24F57911A91AE82DCA496) is inserted in the database when installing the module "org.openbravo.retail.sampledata" which is not a mandatory module when installing Retail in an environment.
Also note that if an environment does not have retail when upgrading to the new version of Openbravo, the brand window is no longer available, so you will not be able to add new brands and you will not be able to migrate brands to product characteristics, because the module script belongs to the retail module "org.openbravo.retail.posterminal".
Steps To Reproduce1. Note that you do not have the "org.openbravo.retail.sampledata" module installed.
2. Upgrading an OB environment to the latest version: note that you do not have the "org.openbravo.retail.sampledata" module installed.
3. Try to do the database update and the compile.

Expected behavior:
 a. The brand update module script should be outside of the retail module.

 b. The data used in the module script such as the ad_tree_id should be in a module that is always installed in the environment.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
blocks defect 0045935 closedranjith_qualiantech_com Errors when migrating brands to product characteristics when upgrading to 20Q4.1 

-  Notes
(0126976)
hgbot (developer)
2021-03-29 08:31

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 3cb5f59e3a8a03c4d99a040c3c0dcd9f4e8b1107
Author: Ranjith S R <ranjith@qualiantech.com>
Date: 2021-03-29T12:01:25+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/3cb5f59e3a8a03c4d99a040c3c0dcd9f4e8b1107 [^]

Fixed ISSUE-46111: Updated Modulescript ConvertBrandIntoCharacteristic
* Update script ConvertBrandIntoCharacteristic to create ad_tree for brand characteristics

---
M build/classes/org/openbravo/retail/posterminal/modulescript/ConvertBrandIntoCharacteristic.class
M build/classes/org/openbravo/retail/posterminal/modulescript/ConvertBrandIntoCharacteristicData.class
M src-util/modulescript/src/org/openbravo/retail/posterminal/modulescript/ConvertBrandIntoCharacteristic.java
M src-util/modulescript/src/org/openbravo/retail/posterminal/modulescript/ConvertBrandIntoCharacteristic_data.xsql
---

- Issue History
Date Modified Username Field Change
2021-03-22 06:58 marvintm Type defect => backport
2021-03-22 06:58 marvintm Target Version => PR21Q1.1
2021-03-29 08:31 hgbot Resolution open => fixed
2021-03-29 08:31 hgbot Status scheduled => resolved
2021-03-29 08:31 hgbot Fixed in Version => RR21Q1.1
2021-03-29 08:31 hgbot Note Added: 0126976
2021-03-29 15:07 marvintm Review Assigned To => marvintm
2021-03-29 15:07 marvintm Status resolved => closed
2021-03-29 15:07 marvintm Fixed in Version RR21Q1.1 => PR21Q1.1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker