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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0050249
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Modules] Distribution Order for Advanced Warehouse Operationsmajoralways2022-09-14 17:102022-10-06 10:35
ReportervmromanosView Statuspublic 
Assigned ToAtulOpenbravo 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Regression date
Regression introduced by commit
Regression level
Review Assigned Tovmromanos
Regression introduced in release
Summary

0050249: Close DO can be launched from two different places, creating problems in Push API

DescriptionThe process of closing a Distribution Order can be launched from two different places:
1. ProcessDistributionOrderUtil.processDistributionOrder()
2. ProcessDistributionOrderUtil.closeDistributionOrders()

The second method was originally private, but it was transformed to public recently.
There are two places that call it now:
2.a. org.openbravo.distributionorder.hooks.implementation.CloseAfterReceiveDistributionOrderHook
2.b. org.openbravo.warehouse.advancedwarehouseoperations.distributionorders.hook.CloseDOIfSkipDeltaTaskGroup


#1 calls #2, and also launches some push api events afterwards, which works fine.

However, the events associated to #2.a. and #2.b. are never launched if the distribution order is closed by calling #2.

It is better to have just one point to process distribution orders, so any related hook works as expected.


Steps To ReproduceNot needed
Proposed SolutionMake #2 private. This is an API change, but nobody else apart from us should be using it, so it is safe.

Modify #2.a. and #2.b. to call #1 instead. This way we centralize this process in just one place.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to design defect 0050421 newTriage Platform Base Openbravo ERP Push API payload generation when event is triggered 
caused by feature request 0049412 closedTriage Omni WMS Openbravo ERP AWO, Close DO automatically when Skip Delta 
related to defect 0052741 closedTriage Omni WMS Modules DO API - Update Distribution Order status event is not triggered when a document change the status from confirm to close 

-  Notes
(0141113)
vmromanos (manager)
2022-09-14 17:10
edited on: 2022-09-14 17:12

Related to https://openbravo.atlassian.net/browse/RM-1862 [^]

Please make sure the flow explained there works fine after the fix

(0141123)
hgbot (developer)
2022-09-14 18:40

Merge Request created: https://gitlab.com/openbravo/product/mods/org.openbravo.distributionorder/-/merge_requests/18 [^]
(0141124)
hgbot (developer)
2022-09-14 18:40

Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/merge_requests/13 [^]
(0141685)
hgbot (developer)
2022-10-05 15:17

Repository: https://gitlab.com/openbravo/product/mods/org.openbravo.distributionorder [^]
Changeset: bd167807234779b4ee26e6e0a04ec8ba15b6f182
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 05-10-2022 13:17:52
URL: https://gitlab.com/openbravo/product/mods/org.openbravo.distributionorder/-/commit/bd167807234779b4ee26e6e0a04ec8ba15b6f182 [^]

Fixed BUG-0050249: Close DO can be launched from two different places, creating problems in Push API

**Make closeDistributionOrders method private so that it
cannot be called from other places.
**Avoid call to closeDistributionOrders instead call
processDistributionOrder to centralize process DO from one
place.

---
M src/org/openbravo/distributionorder/erpCommon/utility/ProcessDistributionOrderUtil.java
M src/org/openbravo/distributionorder/hooks/implementation/CloseAfterReceiveDistributionOrderHook.java
---
(0141686)
hgbot (developer)
2022-10-05 15:17

Merge request merged: https://gitlab.com/openbravo/product/mods/org.openbravo.distributionorder/-/merge_requests/18 [^]
(0141687)
hgbot (developer)
2022-10-05 15:18

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders [^]
Changeset: 029bdba1ef89c3b0cb541140b17b6ad6f9581e59
Author: Atul Gaware <atul.gaware@openbravo.com>
Date: 05-10-2022 06:47:20
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/commit/029bdba1ef89c3b0cb541140b17b6ad6f9581e59 [^]

Related to BUG-0050249: Close DO can be launched from two
different places, creating problems in Push API

**Avoid call to closeDistributionOrders instead call
processDistributionOrder to centralize process DO from one
place

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/hook/CloseDOIfSkipDeltaTaskGroup.java
---
(0141688)
hgbot (developer)
2022-10-05 15:18

Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/merge_requests/13 [^]
(0141720)
hgbot (developer)
2022-10-06 10:35

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders [^]
Changeset: 8eb12d5f04961105f72344a89cb249ba4995fb8b
Author: Víctor Martínez Romanos <victor.martinez@openbravo.com>
Date: 06-10-2022 10:33:03
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.warehouse.advancedwarehouseoperations.distributionorders/-/commit/8eb12d5f04961105f72344a89cb249ba4995fb8b [^]

Related to ISSUE-50249 Related to ISSUE-49412: delete tasks hook not working

Bug caught by the JUnit tests:
org.openbravo.warehouse.advancedwarehouseoperations.distributionorders.test.OBDOWithAWOTests.DOAWO040_SkipDelta
org.openbravo.warehouse.advancedwarehouseoperations.distributionorders.test.OBDOWithAWOTests.DOAWO060_SkipDelta_Default

When confirming a DO with skip delta and the OBDOA_Close_DOI_After_Skip_Delta or
the OBDOA_Close_DOR_After_Skip_Delta preferences are set, the system closes the
DO.

Before the 0050249 fix, the AfterDistributionOrderProcessedHook were not executed
for the 0049412 flow, therefore the AfterDOAWOProcessedHook class was not executed
either, which was wrong.

After the 0050249 fix, the class AfterDOAWOProcessedHook is executed. However, this class
had a bug were it was not possible to delete an assigned task.

The fix refreshes the task (only if necessary) to get an updated version without the assignee
and it adds some useful comments to understand the technical solution approach.

---
M src/org/openbravo/warehouse/advancedwarehouseoperations/distributionorders/hook/AfterDOAWOProcessedHook.java
---

- Issue History
Date Modified Username Field Change
2022-09-14 17:10 vmromanos New Issue
2022-09-14 17:10 vmromanos Assigned To => Triage Omni OMS
2022-09-14 17:10 vmromanos Note Added: 0141113
2022-09-14 17:12 vmromanos Note Edited: 0141113 View Revisions
2022-09-14 17:23 aferraz Assigned To Triage Omni OMS => Triage Omni WMS
2022-09-14 17:39 AtulOpenbravo Status new => scheduled
2022-09-14 17:39 AtulOpenbravo Assigned To Triage Omni WMS => AtulOpenbravo
2022-09-14 17:50 vmromanos Relationship added caused by 0049412
2022-09-14 18:40 hgbot Note Added: 0141123
2022-09-14 18:40 hgbot Note Added: 0141124
2022-10-05 14:27 vmromanos Relationship added related to 0050421
2022-10-05 15:17 hgbot Resolution open => fixed
2022-10-05 15:17 hgbot Status scheduled => resolved
2022-10-05 15:17 hgbot Note Added: 0141685
2022-10-05 15:17 hgbot Note Added: 0141686
2022-10-05 15:18 hgbot Note Added: 0141687
2022-10-05 15:18 hgbot Note Added: 0141688
2022-10-05 15:18 vmromanos Review Assigned To => vmromanos
2022-10-05 15:18 vmromanos Status resolved => closed
2022-10-06 10:35 hgbot Note Added: 0141720
2023-06-16 16:24 AtulOpenbravo Relationship added related to 0052741


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker