Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0030832Openbravo ERP07. Sales managementpublic2015-09-16 11:432015-11-23 21:16
egoitz 
AtulOpenbravo 
immediatemajoralways
closedfixed 
5
 
3.0PR16Q1 
vmromanos
OBPS
Core
37541
No
0030832: potential unneeded storage detail updates on changes for m_inoutlines
M_INOUTLINE_TRG is invoking M_UPDATE_INVENTORY whenever there is an update/insert or delete.
Change any field of a inout line (i.e description) and check that the function M_update_inventory is executed.

That is causing contention on environements with big amount of data and high concurrency using the warehouse picking module
Performance
related to defect 0030526 closed aferraz potential unneeded storage detail updates on changes for movement lines 
Issue History
2015-09-16 11:43egoitzNew Issue
2015-09-16 11:43egoitzAssigned To => platform
2015-09-16 11:43egoitzOBNetwork customer => Yes
2015-09-16 11:43egoitzModules => Core
2015-09-16 11:43egoitzSupport ticket => 37541
2015-09-16 11:43egoitzResolution time => 1443564000
2015-09-16 11:43egoitzTriggers an Emergency Pack => No
2015-09-16 11:44egoitzAssigned Toplatform => Triage Finance
2015-09-16 11:44egoitzCategoryA. Platform => 07. Sales management
2015-09-16 11:44egoitzRelationship addedrelated to 0030526
2015-09-16 12:04egoitzPriorityurgent => immediate
2015-09-16 12:08egoitzTag Attached: Performance
2015-09-24 01:59AtulOpenbravoSummarypotential unneeded storage detail updates on changes for movement lines => potential unneeded storage detail updates on changes for m_inoutlines
2015-09-25 08:22vmromanosStatusnew => scheduled
2015-09-25 08:22vmromanosAssigned ToTriage Finance => AtulOpenbravo
2015-10-01 09:55vmromanosTarget Version3.0PR15Q4 => 3.0PR16Q1
2015-10-07 09:27hgbotCheckin
2015-10-07 09:27hgbotNote Added: 0080850
2015-10-07 09:27hgbotStatusscheduled => resolved
2015-10-07 09:27hgbotResolutionopen => fixed
2015-10-07 09:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5fa35abaa27e94fb885e4cbe2a87359dcd69a050 [^]
2015-10-07 09:27hgbotCheckin
2015-10-07 09:27hgbotNote Added: 0080851
2015-10-07 09:28vmromanosReview Assigned To => vmromanos
2015-10-07 09:28vmromanosNote Added: 0080852
2015-10-07 09:28vmromanosStatusresolved => closed
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082111
2015-11-23 21:16hudsonbotCheckin
2015-11-23 21:16hudsonbotNote Added: 0082112

Notes
(0080850)
hgbot   
2015-10-07 09:27   
Repository: erp/devel/pi
Changeset: 5fa35abaa27e94fb885e4cbe2a87359dcd69a050
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Oct 05 14:56:31 2015 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/5fa35abaa27e94fb885e4cbe2a87359dcd69a050 [^]

Fixes Issue 30832:potential unneeded storage detail updates
on changes for m_inoutlines

Check provided in M_InOutLine_Trg before update operation whether
any of the following is changed in M_InOutLine.

Organization, Product, UOM, AttributeSetInstance, Movement Quantity,
ProductUom, Order Quantity.

Junit test cases to test M_InoutLine_Trg covers following scenarios.
- Insert M_InOutLine.
- Set Product Null in the M_InOutLine.
- Set Product in M_InOutLine where Product was null.
- Set Description in M_InOutLine.
- Delete a M_InOutLine.

---
M src-db/database/model/triggers/M_INOUTLINE_TRG.xml
A src-test/src/org/openbravo/test/db/model/triggers/M_inoutlinetrgTest.java
---
(0080851)
hgbot   
2015-10-07 09:27   
Repository: erp/devel/pi
Changeset: e8cf3936f4c15bd228d88f979947b2adbe9a1e40
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Wed Oct 07 09:25:04 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e8cf3936f4c15bd228d88f979947b2adbe9a1e40 [^]

Related to issue 30832: code review improvements

M_INOUTLINE_TRG:
+ Updated copyright
+ Added more conditions to the if clause when updating
+ Usage of MOVEMENTQTY and QUANTITYORDER instead of v_qtyold, v_qty, v_qtyorderold and v_qtyorder as these variables always make true the if condition (so the fix would useless)
+ In the update part, update first the inventory for the old product/locator as it was done before the refactor

M_inoutlinetrgTest.java:
+ Totally rewritten of the JUnit
+ Support for more scenarios: update locator, update attributesetinstance, work with several lines, purchase and sales flows, etc.
+ Fixed scenarios not properly working before
+ Avoid HQL injection

---
M src-db/database/model/triggers/M_INOUTLINE_TRG.xml
M src-test/src/org/openbravo/test/db/model/triggers/M_inoutlinetrgTest.java
---
(0080852)
vmromanos   
2015-10-07 09:28   
Code review + testing OK
(0082111)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test
(0082112)
hudsonbot   
2015-11-23 21:16   
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/7b56bebaaa88 [^]
Maturity status: Test