Openbravo Issue Tracking System - Retail Modules
View Issue Details
0056349Retail ModulesRetail APIpublic2024-09-03 12:202024-10-01 10:28
kchoperena 
andrea_lopez 
highmajoralways
closedfixed 
5
 
 
No
0056349: [Distribution Order API]: IsAutomaticallyIssueStock parameter is kept between sessions
If a request includes IsAutomaticallyIssueStock=Y at least one time then this configuration is randomly used for other requests that doesn't include this parameter.
1.- Create a distribution order receipt using the back-end
2.- Book it
3.- Using Postman or any REST testing tool send to the Distribution Order API (https://livebuilds.openbravo.com/context/retail_modules_pgsql_pi/api?urls.primaryName=Business%20API%20-%20Transactional%20Data#/DistributionOrder/Import_DistributionOrder [^]) an update for the previously created distribution order issue
Example JSON:
[
  {
    "organization": "The White Valley Group",
    "documentNo": "1000112",
    "isIssue": true,
    "description": "test",
    "IsAutomaticallyIssueStock": true,
    "lines": [
      {
        "lineNo": 10,
        "product": "DX58ORT-F9913",
        "qtyConfirmed": 3
      }
    ]
  }
]
4.- Create another distribution order issue and book it
5.- Update the distribution order issue using the API:
[
  {
    "organization": "The White Valley Group",
    "documentNo": "1000114",
    "isIssue": true,
    "description": "test",
    "lines": [
      {
        "lineNo": 10,
        "product": "DX58ORT-F9913",
        "qtyConfirmed": 3
      }
    ]
  }
]

RESULT: The system is trying to automatically issue the distribution order regardless the IsAutomaticallyIssueStock property is not passed in the request. Note that this might be randomly reproduced.
Revise how the IsAutomaticallyIssueStock is passed to ensure only this request can be seen. This might require discussing with the Platform team
No tags attached.
Issue History
2024-09-03 12:20kchoperenaNew Issue
2024-09-03 12:20kchoperenaAssigned To => Triage Platform Conn
2024-09-03 12:20kchoperenaTriggers an Emergency Pack => No
2024-09-03 12:31vmromanosSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=28400#r28400
2024-09-03 12:35vmromanosNote Added: 0168694
2024-09-03 12:53kchoperenaAssigned ToTriage Platform Conn => Triage Omni WMS
2024-09-09 09:29mtaalAssigned ToTriage Omni WMS => andrea_lopez
2024-09-26 12:54hgbotNote Added: 0169637
2024-10-01 10:28hgbotResolutionopen => fixed
2024-10-01 10:28hgbotStatusnew => closed
2024-10-01 10:28hgbotNote Added: 0169819
2024-10-01 10:28hgbotNote Added: 0169820

Notes
(0168694)
vmromanos   
2024-09-03 12:35   
For the developer fixing it:

The usage of SessionInfo to save the ISSUEQTYMAP is not working as designed, because it is kept outside of the request scope.

This hack was developed in a moment where the API framework was very primitive. We should check with Platform a best way to cover this feature (because I think it is now possible).
(0169637)
hgbot   
2024-09-26 12:54   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/37 [^]
(0169819)
hgbot   
2024-10-01 10:28   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api [^]
Changeset: e226558ca9b30a2bffa108f5657b2ab3e4942ba0
Author: Martin Taal <martin.taal@openbravo.com>
Date: 01-10-2024 08:28:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/commit/e226558ca9b30a2bffa108f5657b2ab3e4942ba0 [^]

Fixes ISSUE-56349: use requestcontext to store issue qty map

---
M src/org/openbravo/distributionorder/api/hook/distributionorder/ImportDOBaseOBObjectFetcher.java
M src/org/openbravo/distributionorder/api/hook/distributionorder/ImportDOUtils.java
---
(0169820)
hgbot   
2024-10-01 10:28   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/37 [^]