Openbravo Issue Tracking System - Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0053273 | Modules | Distribution Orders | public | 2023-08-23 09:46 | 2023-08-23 19:35 |
Reporter | dmiguelez | ||||
Assigned To | AtulOpenbravo | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Merge Request Status | |||||
Regression date | |||||
Regression introduced by commit | |||||
Regression level | |||||
Review Assigned To | |||||
Support ticket | |||||
OBNetwork customer | |||||
Regression introduced in release | |||||
Summary | 0053273: Improve the error message in the DO import API | ||||
Description | When importing a an existing DO through the API with lines that is not in draft status it fails correctly, but the error message does not give information about the document number and line number. It is important because several documents can be imported in a batch. | ||||
Steps To Reproduce | Import a DO trough the API using the provided json. Import it a second time, then it fails with this error message: "Error while importing an item: Not possible to add new lines to an existing document!!!" and should be "Error while importing an item: Not possible to add new lines to an existing document!!! DocumentNo: 9999999999" [ { "documentNo": "9999999999", "organization": "US", "isIssue": false, "warehouseIssue": "WC", "warehouseReceipt": "EC", "orderDate": "2022-06-05", "scheduledDeliveryDate": "2022-06-10", "lines": [ { "product": "CH_CAMEMBERT_CHEESE", "operativeQuantity": 2, "qtyIssued": 2, "qtyReceived": 2 }, { "product": "CH_MANCHEGO_CHEESE", "operativeQuantity": 1, "qtyIssued": 1, "qtyReceived": 1 } ] } ] How to import: As AWO QA Admin client, enable the Web Services for AWO QA Admin Role in the role window and use the swagger URL to import the previous data. | ||||
Proposed Solution | diff --git a/src/org/openbravo/distributionorder/api/hook/distributionorderline/ImportDOLineBaseOBObjectFetcher.java b/src/org/openbravo/distributionorder/api/hook/distributionorderline/ImportDOLineBaseOBObjectFetcher.java index 10eec75..cfcef47 100644 --- a/src/org/openbravo/distributionorder/api/hook/distributionorderline/ImportDOLineBaseOBObjectFetcher.java +++ b/src/org/openbravo/distributionorder/api/hook/distributionorderline/ImportDOLineBaseOBObjectFetcher.java @@ -79,7 +79,11 @@ public class ImportDOLineBaseOBObjectFetcher implements ImportedBaseOBObjectFetc } if (distOrderLine == null && !distOrd.getDocumentStatus().equalsIgnoreCase(ImportDOUtils.DRAFT_STATUS)) { - throw new OBException("Not possible to add new lines to an existing document!!!"); + throw new OBException(String.format( + "Not possible to add new lines to an existing document!!! DocumentNo: %s and LineNo: %s", + distOrd.getDocumentNo(), + properties.containsKey("lineNo") ? (String) properties.get("lineNo") + : "has not been provided in the import data")); } return (T) distOrderLine; } else { | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | screenshot of developed.png (135,502) 2023-08-23 19:35 https://issues.openbravo.com/file_download.php?file_id=18904&type=bug | ||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2023-08-23 09:46 | dmiguelez | New Issue | |||
2023-08-23 09:46 | dmiguelez | Assigned To | => Triage Omni WMS | ||
2023-08-23 09:46 | dmiguelez | Proposed Solution updated | |||
2023-08-23 13:02 | mtaal | Assigned To | Triage Omni WMS => AtulOpenbravo | ||
2023-08-23 13:05 | AtulOpenbravo | Status | new => scheduled | ||
2023-08-23 17:47 | hgbot | Note Added: 0153856 | |||
2023-08-23 19:35 | hgbot | Resolution | open => fixed | ||
2023-08-23 19:35 | hgbot | Status | scheduled => closed | ||
2023-08-23 19:35 | hgbot | Note Added: 0153857 | |||
2023-08-23 19:35 | hgbot | Note Added: 0153858 | |||
2023-08-23 19:35 | mtaal | File Added: screenshot of developed.png |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|