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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0044108
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementmajoralways2020-05-19 16:412020-05-29 13:55
ReporterngarciaView Statuspublic 
Assigned Tocberner 
PriorityhighResolutionfixedFixed in VersionPR20Q3
StatusclosedFix in branchFixed in SCM revision8513209a597a
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0044108: In Discounts and Promotions window, unclear error shown when trying to upload products from a file if they are duplicated

DescriptionIn Discounts and Promotions window, unclear error shown when trying to upload products from a file if they are duplicated
Steps To ReproduceAs group admin role:
   Go to Discounts and promotions window
   Create a header and add a name and a starting date
   Go to Products tab
   Click on the toolbar button "Upload a file to import products into the discount"
   Choose the attached file
   Import Mode: Import and Add
   Import Error Handling: Stop on Error

   Check the following error is shown
      org.hibernate.exception.ConstraintViolationException: could not execute batch

   The log shows:
      ERROR org.hibernate.engine.jdbc.batch.internal.BatchingBatch - HHH000315: Exception executing batch [java.sql.BatchUpdateException: Batch entry 1 insert into M_Offer_Product (...) was aborted: ERROR: duplicate key value violates unique constraint "m_offer_product_unique"
  Detail: Key (m_product_id, m_offer_id)=(..., ...) already exists

   After that, the button keeps loading and it is not active until the window is opened again
TagsNo tags attached.
Attached Filestxt file icon prodDisc.txt [^] (16 bytes) 2020-05-19 16:45 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0120131)
inigo_lerga (reporter)
2020-05-21 13:06
edited on: 2020-05-21 13:08

-- This Issue has been assigned to Platform --
BBDD raises an error due to constraint infraction.
Specifically "m_offer_product_unique".

The proper message for this constraint error is already defined in Application Dictionary, but for an some reason it is not picking up the already defined message and using the default "org.hibernate.exception.ConstraintViolationException: could not execute batch" error message from the BBDD.

The error is thrown in the CommitAndClose call in uploadFile method of ProcessUploadedFile.java
The message defined in AD has the constraint as searchkey and the exception raised in java contains the proper constraintName (info obtained via debugging)

(0120390)
cberner (developer)
2020-05-28 11:17

Merge Request: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/77 [^]
(0120454)
hgbot (developer)
2020-05-29 10:36

Repository: erp/devel/pi
Changeset: 8513209a597a49d0834cfbc0017ab970c10de0be
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Thu May 28 11:08:54 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/8513209a597a49d0834cfbc0017ab970c10de0be [^]

Fixes ISSUE-44108: Show non-generic DB error message on exception in UploadFile

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/businesslogic/ProcessUploadedFile.java
---

- Issue History
Date Modified Username Field Change
2020-05-19 16:41 ngarcia New Issue
2020-05-19 16:41 ngarcia Assigned To => Triage Finance
2020-05-19 16:41 ngarcia Modules => Core
2020-05-19 16:41 ngarcia Triggers an Emergency Pack => No
2020-05-19 16:42 ngarcia Steps to Reproduce Updated View Revisions
2020-05-19 16:44 ngarcia Issue Monitored: networkb
2020-05-19 16:45 ngarcia File Added: prodDisc.txt
2020-05-20 08:48 ngarcia Resolution time => 1560117600
2020-05-20 08:48 ngarcia Severity minor => major
2020-05-20 08:48 ngarcia Resolution time 1560117600 => 1591740000
2020-05-20 11:28 inigo_lerga Status new => scheduled
2020-05-21 09:44 inigo_lerga Assigned To Triage Finance => inigo_lerga
2020-05-21 12:58 inigo_lerga Assigned To inigo_lerga => platform
2020-05-21 12:59 inigo_lerga Status scheduled => acknowledged
2020-05-21 13:06 inigo_lerga Note Added: 0120131
2020-05-21 13:06 inigo_lerga Note Edited: 0120131 View Revisions
2020-05-21 13:06 inigo_lerga Status acknowledged => scheduled
2020-05-21 13:08 inigo_lerga Note Edited: 0120131 View Revisions
2020-05-21 13:35 dmiguelez Status scheduled => acknowledged
2020-05-28 10:03 cberner Assigned To platform => cberner
2020-05-28 11:17 cberner Note Added: 0120390
2020-05-28 11:17 cberner Status acknowledged => scheduled
2020-05-29 10:36 hgbot Checkin
2020-05-29 10:36 hgbot Note Added: 0120454
2020-05-29 10:36 hgbot Status scheduled => resolved
2020-05-29 10:36 hgbot Resolution open => fixed
2020-05-29 10:36 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/8513209a597a49d0834cfbc0017ab970c10de0be [^]
2020-05-29 13:55 alostale Review Assigned To => alostale
2020-05-29 13:55 alostale Status resolved => closed
2020-05-29 13:55 alostale Fixed in Version => 3.0PR20Q3


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker