Openbravo Issue Tracking System - Modules
View Issue Details
0044630ModulesExternal Integration Infrastructurepublic2020-07-17 14:252020-07-24 09:03
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
AugustoMauch
0044630: Not possible to assign null value in multipath properties
Currently it is not possible to assign a null value into a property defined as multipath.
1) Install the org.openbravo.service.external.integration.tests module.
2) Apply the attached test.diff path that contains a change that allows to reproduce the issue
3) Run the BusinessPartnerImportTest. Note that the importating is not done due to the mapping of the "Title" property. This property is defined as multipath ("greeting.name") and to accept null values, but when providing a null value for that property the import fails.

Stack trace of the error:

java.security.InvalidParameterException: No entry found in Greeting with name = null
    at org.openbravo.service.external.integration.mapping.DirectPropertyMapping.getReferencedRecord(DirectPropertyMapping.java:157)
    at org.openbravo.service.external.integration.mapping.DirectPropertyMapping.setMappingValue(DirectPropertyMapping.java:131)
    at org.openbravo.service.external.integration.mapping.DirectPropertyMapping.setMappingValue(DirectPropertyMapping.java:1)
    at org.openbravo.service.external.integration.mapping.PropertyMapping.importMappingValue(PropertyMapping.java:126)
    at
...
No tags attached.
blocks defect 0044631 closed rqueralta Retail Modules The mapping for the genericProduct property in import Product endpoint is not correct 
diff test.diff (2,810) 2020-07-17 14:50
https://issues.openbravo.com/file_download.php?file_id=14779&type=bug
Issue History
2020-07-17 14:25caristuNew Issue
2020-07-17 14:25caristuAssigned To => platform
2020-07-17 14:26caristuAssigned Toplatform => caristu
2020-07-17 14:26caristuReview Assigned To => AugustoMauch
2020-07-17 14:29caristuRelationship addedblocks 0044631
2020-07-17 14:44caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21370#r21370
2020-07-17 14:50caristuFile Added: test.diff
2020-07-17 14:54caristuNote Added: 0121511
2020-07-23 18:20hgbotCheckin
2020-07-23 18:20hgbotNote Added: 0121590
2020-07-23 18:20hgbotStatusnew => resolved
2020-07-23 18:20hgbotResolutionopen => fixed
2020-07-23 18:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/a6c24088604a699cdfe4d83a5e6285d30f5f0124 [^]
2020-07-23 18:22hgbotCheckin
2020-07-23 18:22hgbotNote Added: 0121591
2020-07-24 09:03caristuStatusresolved => closed

Notes
(0121511)
caristu   
2020-07-17 14:54   
MR: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.external.integration/-/merge_requests/3 [^]
(0121590)
hgbot   
2020-07-23 18:20   
Repository: erp/pmods/org.openbravo.service.external.integration
Changeset: a6c24088604a699cdfe4d83a5e6285d30f5f0124
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Fri Jul 17 14:53:06 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/a6c24088604a699cdfe4d83a5e6285d30f5f0124 [^]

Fixes ISSUE-44630: support null value in import multi-path property

---
M src/org/openbravo/service/external/integration/mapping/DirectPropertyMapping.java
---
(0121591)
hgbot   
2020-07-23 18:22   
Repository: erp/pmods/org.openbravo.service.external.integration.tests
Changeset: 6efbe9cc2920440f9411648a837a486543b93608
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Thu Jul 23 18:22:03 2020 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration.tests/rev/6efbe9cc2920440f9411648a837a486543b93608 [^]

Related to ISSUE-44630: add test case

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
M src-test/org/openbravo/service/external/integration/test/_import/BusinessPartnerImportTest.java
---