Openbravo Issue Tracking System - Modules
View Issue Details
0041399ModulesExternal Integration Infrastructurepublic2019-07-18 17:412019-08-19 10:29
migueldejuana 
caristu 
normalmajoralways
closedfixed 
5
 
 
AugustoMauch
0041399: Identifies record univocally feature doesn't work with derived properties
When we are mapping an Entity, if we set a Mapping Property as DirectPropertyMapping and Openbravo Property path: "client.id" it doesn't work.
Otherwise, if we set Openbravo Property path: "uOM.name" for Product entity it works correctly. It happens when "Identifies record univocally" is checked.
1- Install the External Integration Test module[1]
2- Apply the attached patch (testIssue41399.diff) which provides a test that processes an entity mapping with a One To Many property mapping whose corresponding value is null. Note that in this case, the One To Many property mapping is defined to accept null values.
3- Run the test. It fails with a CheckException. Stack trace error:

org.openbravo.base.util.CheckException: Property organization.id does not exist for entity BusinessPartner
    at org.openbravo.base.util.Check.isNotNull(Check.java:72)
    at org.openbravo.base.model.Entity.getProperty(Entity.java:570)
    at org.openbravo.base.model.Entity.getProperty(Entity.java:552)
    at org.openbravo.service.external.integration.importer.DalSynchronizableBusinessObjectImporter.getTargetProperty(DalSynchronizableBusinessObjectImporter.java:207)
...
No tags attached.
diff testIssue41399.diff (8,756) 2019-08-13 13:49
https://issues.openbravo.com/file_download.php?file_id=13232&type=bug
Issue History
2019-07-18 17:41migueldejuanaNew Issue
2019-07-18 17:41migueldejuanaAssigned To => AugustoMauch
2019-07-19 08:44migueldejuanaDescription Updatedbug_revision_view_page.php?rev_id=19157#r19157
2019-08-13 13:25caristuSummaryEntity Mapping Property doesn't work with client.id => Identifies record univocally feature doesn't work with derived properties
2019-08-13 13:27caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19302#r19302
2019-08-13 13:33caristuFile Added: testIssue41399.diff
2019-08-13 13:34caristuFile Deleted: testIssue41399.diff
2019-08-13 13:49caristuFile Added: testIssue41399.diff
2019-08-13 13:52caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19305#r19305
2019-08-13 13:57hgbotCheckin
2019-08-13 13:57hgbotNote Added: 0113990
2019-08-13 13:57hgbotCheckin
2019-08-13 13:57hgbotNote Added: 0113991
2019-08-13 13:57hgbotStatusnew => resolved
2019-08-13 13:57hgbotResolutionopen => fixed
2019-08-13 13:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/e8e16d1169f606ebd29fd0a492e49845daddc57d [^]
2019-08-13 13:58caristuAssigned ToAugustoMauch => caristu
2019-08-13 13:58caristuReview Assigned To => AugustoMauch
2019-08-13 15:19hgbotCheckin
2019-08-13 15:19hgbotNote Added: 0113994
2019-08-19 10:29AugustoMauchNote Added: 0114064
2019-08-19 10:29AugustoMauchStatusresolved => closed

Notes
(0113990)
hgbot   
2019-08-13 13:57   
Repository: erp/pmods/org.openbravo.service.external.integration.tests
Changeset: b28c6d7088fa90105526bbf7ebf689733d390401
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Aug 13 13:56:36 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration.tests/rev/b28c6d7088fa90105526bbf7ebf689733d390401 [^]

related to bug 41399: test mapping with derived prop to identify record

---
M src-db/database/sourcedata/OBEI_PROP_MAP_INSTANCE.xml
M src-test/org/openbravo/service/external/integration/test/_import/BusinessPartnerImportTest.java
---
(0113991)
hgbot   
2019-08-13 13:57   
Repository: erp/pmods/org.openbravo.service.external.integration
Changeset: e8e16d1169f606ebd29fd0a492e49845daddc57d
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Aug 13 13:53:27 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration/rev/e8e16d1169f606ebd29fd0a492e49845daddc57d [^]

fixes bug 41399: Identifies record univocally doesn't work with derived props

---
M src/org/openbravo/service/external/integration/importer/DalSynchronizableBusinessObjectImporter.java
---
(0113994)
hgbot   
2019-08-13 15:19   
Repository: erp/pmods/org.openbravo.service.external.integration.tests
Changeset: 76d8c351960fc55d89b469bed029048d5acf4b9b
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Aug 13 15:18:56 2019 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.service.external.integration.tests/rev/76d8c351960fc55d89b469bed029048d5acf4b9b [^]

related to bug 41399: adapt bp stub to the new mapping definition

---
M src-test/org/openbravo/service/external/integration/test/property_mappings/_import/builder/ImportSboBusinessPartnerStub.java
---
(0114064)
AugustoMauch   
2019-08-19 10:29   
Code reviewed and verified