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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0053228
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementmajoralways2023-08-17 13:272023-09-08 14:57
ReporterLeyreView Statuspublic 
Assigned ToAugustoMauch 
PrioritynormalResolutionfixedFixed in VersionPR23Q4
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

0053228: Error when trying to delete a variant with a new column "image BLOB" in m_product table.

DescriptionError when trying to delete a variant with a new column "image BLOB" in m_product table.
Steps To Reproduce1. Create a new column in the m_product table that references to an image:
ALTER TABLE public.m_product ADD COLUMN em_pit_sketch_image_id character varying(32);
ALTER TABLE public.m_product
ADD CONSTRAINT em_pit_prod_sketch_imag FOREIGN KEY (em_pit_sketch_image_id)
REFERENCES public.ad_image (ad_image_id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION;

2. As 'System Administrator':
  2.1 In the m_product table, add the new column (using the "create columns form DB" button) and set Reference: Image BLOB.
  2.2 In the "Product" window, add a new field -> Column: EM_Pit_Sketch_Image_ID and name: test.
  
3. As 'The White Valley Group Admin - The White Valley Group':
  3.1 Configure a new generic product and add an image in the test section.
  3.2 Add a Characteristic for this product.
  
4. Click on "Create Variants" button and confirm that there are new products-variants.

5. Try to delete one of the new product/variant created and confirm that it is not possible:

Error: This record cannot be deleted because it is associated with other existing elements. Please see Linked Items
Fix: See attached possible .diff
TagsNo tags attached.
Attached Filesdiff file icon fixEliminarVarianteConImagenes.diff [^] (1,880 bytes) 2023-08-17 13:27 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0154520)
hgbot (developer)
2023-09-05 17:28

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/988 [^]
(0154644)
hgbot (developer)
2023-09-08 14:57

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/988 [^]
(0154645)
hgbot (developer)
2023-09-08 14:57

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: b8172c7f81d0bd1ff96f38ff778320df43b003e0
Author: Augusto Mauch <augusto.mauch@openbravo.com>
Date: 08-09-2023 12:57:01
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/b8172c7f81d0bd1ff96f38ff778320df43b003e0 [^]

Fixes ISSUE-53228: Variant product with custom images can be deleted

The problem was that the check being done in RemoveImagesEventHandler to determine if a given image was still
referenced by other records was not done properly. The check was always being done against the product.ad_image_id
column, even though the image property being checked could be another.

As part of this fix, also the hardcoded reference to Product has been updated, to make sure this event handler works
with other entities that contain product images

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java
---

- Issue History
Date Modified Username Field Change
2023-08-17 13:27 Leyre New Issue
2023-08-17 13:27 Leyre Assigned To => Triage Omni OMS
2023-08-17 13:27 Leyre File Added: fixEliminarVarianteConImagenes.diff
2023-08-17 13:27 Leyre Modules => Core
2023-08-17 13:27 Leyre Triggers an Emergency Pack => No
2023-08-17 13:34 Practics Issue Monitored: Practics
2023-08-17 14:07 aferraz Assigned To Triage Omni OMS => Triage Platform Base
2023-09-05 17:28 hgbot Note Added: 0154520
2023-09-06 08:21 AugustoMauch Assigned To Triage Platform Base => AugustoMauch
2023-09-06 08:21 AugustoMauch Status new => scheduled
2023-09-08 14:57 hgbot Note Added: 0154644
2023-09-08 14:57 hgbot Resolution open => fixed
2023-09-08 14:57 hgbot Status scheduled => closed
2023-09-08 14:57 hgbot Fixed in Version => PR23Q4
2023-09-08 14:57 hgbot Note Added: 0154645


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker