Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0028908 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] 02. Master data management | minor | always | 2015-02-10 14:03 | 2015-05-11 21:53 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | jorge-garcia | |||||||
Priority | high | Resolution | fixed | Fixed in Version | pi | |||
Status | closed | Fix in branch | Fixed in SCM revision | 50fe70db3a66 | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | pi | SCM revision | ||||||
Merge Request Status | ||||||||
Review Assigned To | umartirena | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 34196 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0028908: Not possible to delete a variant if the generic product has an image | |||||||
Description | Not possible to delete a variant if it was created from a generic product that has an image. The following error appears in the log: 2015-02-10 14:01:11,461 [ajp-localhost%2F127.0.0.1-8809-7] ERROR org.hibernate.util.JDBCExceptionReporter - Batch entry 0 delete from AD_Image where AD_Image_ID='image_UUID' was aborted. Call getNextException to see the cause. 2015-02-10 14:01:11,461 [ajp-localhost%2F127.0.0.1-8809-7] ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: update or delete on table "ad_image" violates foreign key constraint "m_product_ad_image" on table "m_product" Detail: Key (ad_image_id)=(image_UUID) is still referenced from table "m_product". | |||||||
Steps To Reproduce | 1) Go to the [Product Characteristic] window. Create a new variant characteristic with one value at least 2) In the [Product] window create a new generic product and set an image for it 3) Assign the characteristic created in 1) to the generic product 4) Generate some variants, for example using the Manage Variants process 5) Try to delete one of the variants | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0077050) jorge-garcia (viewer) 2015-05-06 13:05 |
Test Plan 1) Go to the [Product Characteristic] window. Create a new variant characteristic with one value at least 2) In the [Product] window create a new generic product and set an image for it 3) Search the image in the ad_image table in the database. 4) Assign the characteristic created in step 1) to the generic product. 5) Generate some variants, using the Manage Variants process. 6) Try to delete one of the variants. 7) Check that the generic product and the rest of the variants still have the associated image. 8) Keep deleting the variants and checking the image is still associated. 9) Finally, delete the generic product you created in step 2) and check the image is deleted in the database. |
(0077098) hgbot (developer) 2015-05-07 16:46 |
Repository: erp/devel/pi Changeset: 50fe70db3a66713b3795e6f21a2481e37553d14e Author: Jorge Garcia <jorge.garcia <at> openbravo.com> Date: Tue May 05 11:44:51 2015 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/50fe70db3a66713b3795e6f21a2481e37553d14e [^] Fixed issue 28908: Not possible to delete a variant if has an image Not possible to delete a variant if the generic product has an image. The problem was that the image is shared among the generic product and its variants. The solution is to check if other products has the same image_id when deleting a record. In case that this check is true, the image isn't deleted from the database, otherwise, the image is deleted from the database. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java --- |
(0077099) hgbot (developer) 2015-05-07 16:46 |
Repository: erp/devel/pi Changeset: 3689ff974394155d3194670a1d854a89fd22aa3e Author: Unai Martirena <unai.martirena <at> openbravo.com> Date: Thu May 07 16:45:23 2015 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/3689ff974394155d3194670a1d854a89fd22aa3e [^] Related to bug 28908: Fix copyright and format --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java --- |
(0077100) umartirena (viewer) 2015-05-07 16:46 |
Code Review + Testing OK |
(0077225) hgbot (developer) 2015-05-08 11:16 |
Repository: erp/devel/pi Changeset: 387af567776f559ad30a170319726bbf403ee590 Author: Unai Martirena <unai.martirena <at> openbravo.com> Date: Fri May 08 11:11:43 2015 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/387af567776f559ad30a170319726bbf403ee590 [^] Related to bug 28908: Code Review [1]: Only check if any other product is using the image, if current product has an image. [2]: Make method 'checkImageUtilization' more understandable returning a boolean value instead of a Product object that is not used later on. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/event/RemoveImagesEventHandler.java --- |
(0077248) hudsonbot (viewer) 2015-05-08 15:39 |
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/d5cb256a6a8a [^] Maturity status: Test |
(0077249) hudsonbot (viewer) 2015-05-08 15:39 |
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/d5cb256a6a8a [^] Maturity status: Test |
(0077309) hudsonbot (viewer) 2015-05-11 21:53 |
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/a55bc3c14e8c [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2015-02-10 14:03 | caristu | New Issue | |
2015-02-10 14:03 | caristu | Assigned To | => Sandrahuguet |
2015-02-10 14:03 | caristu | OBNetwork customer | => Yes |
2015-02-10 14:03 | caristu | Modules | => Core |
2015-02-10 14:03 | caristu | Support ticket | => 34196 |
2015-02-10 14:03 | caristu | Resolution time | => 1430172000 |
2015-02-10 14:03 | caristu | Triggers an Emergency Pack | => No |
2015-02-23 13:30 | jonalegriaesarte | Target Version | 3.0PR15Q2 => 3.0PR15Q3 |
2015-03-09 17:34 | jonalegriaesarte | Resolution time | 1430172000 => |
2015-04-01 16:53 | jorge-garcia | Status | new => scheduled |
2015-04-01 16:53 | jorge-garcia | Assigned To | Sandrahuguet => jorge-garcia |
2015-05-06 13:05 | jorge-garcia | Note Added: 0077050 | |
2015-05-07 16:46 | hgbot | Checkin | |
2015-05-07 16:46 | hgbot | Note Added: 0077098 | |
2015-05-07 16:46 | hgbot | Status | scheduled => resolved |
2015-05-07 16:46 | hgbot | Resolution | open => fixed |
2015-05-07 16:46 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/50fe70db3a66713b3795e6f21a2481e37553d14e [^] |
2015-05-07 16:46 | hgbot | Checkin | |
2015-05-07 16:46 | hgbot | Note Added: 0077099 | |
2015-05-07 16:46 | umartirena | Review Assigned To | => umartirena |
2015-05-07 16:46 | umartirena | Note Added: 0077100 | |
2015-05-07 16:46 | umartirena | Status | resolved => closed |
2015-05-07 16:46 | umartirena | Fixed in Version | => pi |
2015-05-08 11:16 | hgbot | Checkin | |
2015-05-08 11:16 | hgbot | Note Added: 0077225 | |
2015-05-08 15:39 | hudsonbot | Checkin | |
2015-05-08 15:39 | hudsonbot | Note Added: 0077248 | |
2015-05-08 15:39 | hudsonbot | Checkin | |
2015-05-08 15:39 | hudsonbot | Note Added: 0077249 | |
2015-05-11 21:53 | hudsonbot | Checkin | |
2015-05-11 21:53 | hudsonbot | Note Added: 0077309 |
Copyright © 2000 - 2009 MantisBT Group |