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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0053615
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSmajoralways2023-10-06 21:562023-10-20 07:18
ReporteraxelmercadoView Statuspublic 
Assigned ToRajesh_18 
PriorityurgentResolutionfixedFixed in VersionRR24Q1
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0053615: Errors when migrating brands to product characteristics when upgrading to 23Q3

DescriptionWhen you want to migrate to the latest version of OB 23Q3, the Retail module script "ConvertBrandIntoCharacteristic.java" fails, because if you have 2 different clients each with their respective brands, it tries to insert 2 times the "Product Characteristic tree" showing the following error:
"[java] 142138 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristicData - SQL error in query: insert into ad_tree(ad_tree_id, ad_client_id, ad_org_id, createdby, updatedby, name, description, treetype, isallnodes, ad_table_id) values ('899D83A7B7E24F57911A91AE82DCA496', ?, '0', '100', '100', 'Product Characteristic tree', null, 'CH', 'Y', 'E913D17C9B3847CF92235082DBE2EC44') :org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "ad_tree_key"
[java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists.
[java] 142138 [main] ERROR org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic - Errors converting brand into characteristic
[java] 142138 [main] ERROR org.openbravo.base.ExecutionLimitBaseProcess - Error executing moduleScript org.openbravo.retail.posterminal.modulescript.ConvertBrandIntoCharacteristic: @CODE=0@ERROR: duplicate key value violates unique constraint "ad_tree_key"
[java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists.
[java] javax.servlet.ServletException: @CODE=0@ERROR: duplicate key value violates unique constraint "ad_tree_key"
[java] Detail: Key (ad_tree_id)=(899D83A7B7E24F57911A91AE82DCA496) already exists.".


This is because the (ad_tree_id)=899D83A7B7E24F57911A91AE82DCA496) is inserted in the database for each existing customer that uses the product characteristic tree (See attached screenshots).

<SqlMethod name="insertCharacteristicsTree" type="preparedStatement" connection="true" return="rowCount">
    <SqlMethodComment></SqlMethodComment>
    <Sql>
      <![CDATA[
      insert into ad_tree(ad_tree_id, ad_client_id, ad_org_id, createdby, updatedby, name, description, treetype, isallnodes, ad_table_id) values ('899D83A7B7E24F57911A91AE82DCA496', ?, '0', '100', '100', 'Product Characteristic tree', null, 'CH', 'Y', 'E913D17C9B3847CF92235082DBE2EC44')
      ]]>
    </Sql>
    <Parameter name="adClientId"/>
Steps To ReproduceN/A
TagsNo tags attached.
Attached Filespng file icon cap1.png [^] (176,269 bytes) 2023-10-06 21:56

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

-  Notes
(0155796)
hgbot (developer)
2023-10-12 07:03

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1382 [^]
(0156102)
hgbot (developer)
2023-10-20 07:18

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 2c11a040917df500019da98d8f1b784390219752
Author: Rajesh Senthilkumar <rajesh@qualiantech.com>
Date: 20-10-2023 05:18:33
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/2c11a040917df500019da98d8f1b784390219752 [^]

Fixes ISSUE-53615: Added Client condition while migrating brands to product 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
---
(0156103)
hgbot (developer)
2023-10-20 07:18

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/merge_requests/1382 [^]

- Issue History
Date Modified Username Field Change
2023-10-06 21:56 axelmercado New Issue
2023-10-06 21:56 axelmercado Assigned To => Retail
2023-10-06 21:56 axelmercado File Added: cap1.png
2023-10-06 21:56 axelmercado Triggers an Emergency Pack => No
2023-10-06 22:11 axelmercado Relationship added related to 0045935
2023-10-06 23:07 Practics Issue Monitored: Practics
2023-10-09 08:51 Rajesh_18 Assigned To Retail => Rajesh_18
2023-10-09 08:51 Rajesh_18 Status new => scheduled
2023-10-09 16:34 axelmercado Description Updated View Revisions
2023-10-12 07:03 hgbot Note Added: 0155796
2023-10-20 07:18 hgbot Resolution open => fixed
2023-10-20 07:18 hgbot Status scheduled => closed
2023-10-20 07:18 hgbot Fixed in Version => RR24Q1
2023-10-20 07:18 hgbot Note Added: 0156102
2023-10-20 07:18 hgbot Note Added: 0156103


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker