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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040547
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 02. Master data managementmajoralways2019-04-08 10:482019-05-27 13:54
ReporterkchoperenaView Statuspublic 
Assigned Tononofrancisco 
PriorityhighResolutionfixedFixed in Version3.0PR19Q3
StatusclosedFix in branchFixed in SCM revisionfe5a1e5fb576
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToSandrahuguet
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0040547: m_ch_value_trg2 is not taking into account the new created register

DescriptionThe m_ch_value_trg2 trigger allows the creation of a duplicated m_ch_value breaking the uniqueness pair (M_characteristic_id, name) related to a variant characteristic. After the insertion, the trigger blocks the creation of new characteristic values because of duplicated registers.
Steps To Reproduce1.- Go to the back-end and create a product characteristic:
    - Org: F&B España - Región Norte
    - Name: TestCharacteristic
    - Variant = N
    - Use on WebPOS = Y
    - Explode configuration tab = Y
    - Filter on WebPOS = Y
    - Active = Y

2.- Go to the back-end and insert a m_ch_value related to the variant characteristic with the name 'characteristicValueName'
    - Name = Test
    - SummaryLevel = N
    - Active = Y

2.- Go to the back-end and insert again the same characteristic value
 
3.- Update the characteristic TestCharacteristic to Variant = Y

3.- Try to insert any characteristic value with a different value

EXPECTED RESULTS:

Any new insert in characteristic value table will be blocked
Proposed SolutionChange the m_ch_value_trg2 to take into account the new register
TagsNo tags attached.
Attached Filesdiff file icon mChValueTrg2.diff [^] (1,354 bytes) 2019-04-08 10:48 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0041333 closedcollazoandy4 Duplicate values when create new Product characteristics values 

-  Notes
(0111692)
nonofrancisco (developer)
2019-05-15 16:48

Test Plan

As Openbravo/F&B International Group Admin
Open Product Characteristic window
Create a new header
  Organization: F&B España - Región Norte
  Name: TestCharacteristicA
  Variant = N
Go to Values tab
Create twoo new record with same values
  Name: ValueA
Create a new header
  Organization: F&B España - Región Norte
  Name: TestCharacteristicB
  Variant = N
Go to Values tab
Create a new record
  Name: ValueA
Select product characteristic with name TestCharacteristicA
Set Variant = true
Go to Values tab
Create a new record
  Name: ValueA
Verify an exception is thrown indicating there are duplicated values
Select product characteristic with name TestCharacteristicB
Create a new record
  Name: ValueA
Verify the operation completes successfully
(0112061)
hgbot (developer)
2019-05-22 08:26

Repository: erp/devel/pi
Changeset: fe5a1e5fb57689ec01f42931ce3ec7405be94fc2
Author: Nono Carballo <nonofce <at> gmail.com>
Date: Tue May 14 13:09:53 2019 -0400
URL: http://code.openbravo.com/erp/devel/pi/rev/fe5a1e5fb57689ec01f42931ce3ec7405be94fc2 [^]

Fixes issue 40547: Check for duplicates in Event Observer

Prior this fix, duplicate values in m_ch_value were checked in a statement
level trigger, blocking insertions in some flows.

This fix removes trigger and adds logic for check duplicates in an Event
Observer, to avoid the table mutating problem in Oracle.

---
M src/org/openbravo/event/CharacteristicValueEventHandler.java
R src-db/database/model/triggers/M_CH_VALUE_TRG2.xml
---
(0112062)
Sandrahuguet (developer)
2019-05-22 08:32

Code review + testing ok
(0112168)
hudsonbot (developer)
2019-05-27 13:54

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/bdad8ace6f89 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2019-04-08 10:48 kchoperena New Issue
2019-04-08 10:48 kchoperena Assigned To => platform
2019-04-08 10:48 kchoperena File Added: mChValueTrg2.diff
2019-04-08 10:48 kchoperena Modules => Core
2019-04-08 10:48 kchoperena Resolution time => 1555884000
2019-04-08 10:48 kchoperena Triggers an Emergency Pack => No
2019-04-08 10:57 alostale Assigned To platform => Triage Finance
2019-04-25 16:51 Sandrahuguet Assigned To Triage Finance => nonofrancisco
2019-04-25 17:55 Sandrahuguet Category A. Platform => 02. Master data management
2019-04-29 17:33 Sandrahuguet Resolution time 1555884000 => 1557957600
2019-05-02 06:28 nonofrancisco Status new => scheduled
2019-05-07 09:28 kchoperena Steps to Reproduce Updated View Revisions
2019-05-07 09:31 kchoperena Steps to Reproduce Updated View Revisions
2019-05-14 09:51 kchoperena Steps to Reproduce Updated View Revisions
2019-05-15 16:48 nonofrancisco Note Added: 0111692
2019-05-22 08:26 hgbot Checkin
2019-05-22 08:26 hgbot Note Added: 0112061
2019-05-22 08:26 hgbot Status scheduled => resolved
2019-05-22 08:26 hgbot Resolution open => fixed
2019-05-22 08:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/fe5a1e5fb57689ec01f42931ce3ec7405be94fc2 [^]
2019-05-22 08:32 Sandrahuguet Review Assigned To => Sandrahuguet
2019-05-22 08:32 Sandrahuguet Note Added: 0112062
2019-05-22 08:32 Sandrahuguet Status resolved => closed
2019-05-22 08:32 Sandrahuguet Fixed in Version => 3.0PR19Q3
2019-05-27 13:54 hudsonbot Checkin
2019-05-27 13:54 hudsonbot Note Added: 0112168
2019-07-10 15:54 Sandrahuguet Relationship added related to 0041333


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker