Openbravo Issue Tracking System - Retail Modules
View Issue Details
0055738Retail ModulesRetail APIpublic2024-06-11 13:152024-06-21 10:02
guillermogil 
Triage Platform Conn 
normalmajoralways
closedfixed 
5
 
 
No
0055738: Extra Greeting being generated in case name = " "
Extra Greeting being generated in case name = " " everytime a BP integration is being sent.
This is happening with new BPs and with updates therefore tones of records in c_greeting are being generated.

It seems that there is some case with "" or " " that are not being treated as strings although it is the identifier for the API.
With postman sent the following request twice (it is the standard one but with the name of the greeting as " "):
{
    "client": "The White Valley Group",
    "organization": "The White Valley Group",
    "active": true,
    "searchKey": "TestBP",
    "commercialName": "TestBP",
    "fiscalName": "TestBP",
    "description":"TestBP",
    "bpCategory": "Customer",
    "currency": "EUR",
    "paymentMethod": "Cash",
    "paymentTerms": "Treinta días",
    "priceList": "The White Valley Group Sale Price List",
    "customerConsent": false,
    "creditLineLimit": 0,
    "currentBalance": 0,
    "invoiceTerms": "I",
    "greeting": {
        "name": " "
    },
    "locations": [
        {
            "address": "Pau Claris 138 1-2",
            "city": "Barcelona",
            "zipCode": "08009",
            "country": "ES",
            "name": ".Barcelona, Pau Claris 138 1-2"
        }
    ],
    "contactInformation": [
        {
            "firstName": "TestBP",
            "lastName": "TestBP",
            "active": true,
            "phone": "65986597",
            "email": "TestBP@TestBP.com"
        }
    ],
    "businessPartnerType": "PR",
    "isCustomer": true,
    "isVendor": true,
    "purchasePriceList": {
        "organization": "The White Valley Group",
        "name": "The White Valley Group Purchase Price List"
    },
    "poPaymentMethod": {
        "organization": "0",
        "name": "Cash"
    },
    "poPaymentTerms": "30d",
    "poFinancialAccount": {
        "organization": "White Valley Spain S.A",
        "name": "Bank Account 1 - White Valley Spain"
    },
    "poMaturityDate1": 100,
    "poMaturityDate2": 50,
    "poMaturityDate3": 60,
    "taxCategory": {
        "organization": "The White Valley Group",
        "name": "Arrendamientos con retención"
    }
}
No tags attached.
related to defect 0052990 closed Triage Platform Conn can't import an empty identifier property 
Issue History
2024-06-11 13:15guillermogilNew Issue
2024-06-11 13:15guillermogilAssigned To => Triage Platform Conn
2024-06-11 13:15guillermogilTriggers an Emergency Pack => No
2024-06-11 13:15guillermogilDescription Updatedbug_revision_view_page.php?rev_id=28090#r28090
2024-06-18 12:40caristuRelationship addedrelated to 0052990
2024-06-20 09:09hgbotNote Added: 0166127
2024-06-20 09:19hgbotNote Added: 0166128
2024-06-21 09:54hgbotNote Added: 0166187
2024-06-21 09:54hgbotResolutionopen => fixed
2024-06-21 09:54hgbotStatusnew => closed
2024-06-21 09:54hgbotNote Added: 0166188
2024-06-21 10:02hgbotNote Added: 0166189
2024-06-21 10:02hgbotNote Added: 0166190

Notes
(0166127)
hgbot   
2024-06-20 09:09   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/43 [^]
(0166128)
hgbot   
2024-06-20 09:19   
Merge Request created: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/merge_requests/25 [^]
(0166187)
hgbot   
2024-06-21 09:54   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/43 [^]
(0166188)
hgbot   
2024-06-21 09:54   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration [^]
Changeset: 435727b6ecd2fd30cc19d0442bec9521a3b840da
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 20-06-2024 19:52:24
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/commit/435727b6ecd2fd30cc19d0442bec9521a3b840da [^]

fixes BUG-55738: identifier property value is not set if empty or whitespace only

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/service/external/integration/mapping/DirectPropertyMapping.java
---
(0166189)
hgbot   
2024-06-21 10:02   
Repository: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests [^]
Changeset: 1ff4271b12c68ba551a3f6de433d40a00c61ccf6
Author: Carlos Aristu <carlos.aristu@openbravo.com>
Date: 21-06-2024 09:56:54
URL: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/commit/1ff4271b12c68ba551a3f6de433d40a00c61ccf6 [^]

related to BUG-55738: add test cases

  Add test cases to demonstrate that when an empty or withespace only
string is passed as the value of the identifier property then the value
is not processed while importing and the value is not set (is left as
null). Therefore, if the identifier is backed by a mandatory column the
import operation (insert) cannot be completed.

  Add also a test case for passing directly a null value for the
identifier which should make the import fail in the same way when the
identifier is backed by a mandatory column.

---
M src-test/org/openbravo/service/external/integration/test/_import/CountryImportTest.java
---
(0166190)
hgbot   
2024-06-21 10:02   
Merge request merged: https://gitlab.com/openbravo/ci/modules/org.openbravo.service.external.integration.tests/-/merge_requests/25 [^]