Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0053273 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Modules] Distribution Orders | minor | always | 2023-08-23 09:46 | 2023-08-23 19:35 | |||
Reporter | dmiguelez | View Status | public | |||||
Assigned To | AtulOpenbravo | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Regression date | ||||||||
Regression introduced by commit | ||||||||
Regression level | ||||||||
Review Assigned To | ||||||||
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 { | |||||||
Tags | No tags attached. | |||||||
Attached Files | screenshot of developed.png [^] (135,502 bytes) 2023-08-23 19:35
| |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0153856) hgbot (developer) 2023-08-23 17:47 |
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/22 [^] |
(0153857) hgbot (developer) 2023-08-23 19:35 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api [^] Changeset: 81cc5ca905320e079a8663e1a147041f2c0ef81a Author: Atul Gaware <atul.gaware@openbravo.com> Date: 23-08-2023 17:35:00 URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/commit/81cc5ca905320e079a8663e1a147041f2c0ef81a [^] Fixes BUG-0053273: Improve the error message in the DO import API --- M src/org/openbravo/distributionorder/api/hook/distributionorderline/ImportDOLineBaseOBObjectFetcher.java --- |
(0153858) hgbot (developer) 2023-08-23 19:35 |
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.distributionorder.api/-/merge_requests/22 [^] |
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 |
Copyright © 2000 - 2009 MantisBT Group |