(OFBIZ-10540)
Improve the previous fix at r183834 where an error has been introduce with the entity WorkEffortContactMech who is different than OrderContactMech (no purpose but fromDate, thruDate) where at the beginning I thinking, wrongly, that they was the same pattern.
I completed the generic function *getEntityContactMechValueMaps* to analyze on the fly what element have the entityview. To complete, I added unit test for WorkEffortContactMech.
Thanks to Deepak Nigam for the control.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840296 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10514)
ContactMechWorker.get[Entity]ContactMechValueMaps are old historic functions that resolve all contact mech context related to an Entity (Party, Facility, Order, WorkEffort).
The problem that they create too many db call during their execution that decrease OFBiz performance when the contactMech history grow.
A solution use to improve the process speed was replace all db call through *GenericValue.getRelated* function by *Delegator.makeValidValue* to instanciate each GenericValue needed after an unique search call on a viewEntity. For the four entities : Party, Facility, Order and WorkEffort, I use the same view structure with a sub view entity on ContactMechDetail. This offer more genericity and permit to slim code.
This commit introduce a regression on genericValue resolved for ContactMechType and ContactMechPurposeType that currently lost their description, it's actually not awkward because theses genericValue use the function .get("description", locale) to resolve the description so call directly the label system.
For Order and WorkEffort, I merged the resolving process in one function, that can be extend later easily for some other entity like Invoice or Quote.
The new FtpAddress wasn't managed by this worker so I introduce it to keep the coherence.
Last improvement, I use
getPartyContactMechValueMaps(Delegator delegator, String partyId, Timestamp date, String contactMechTypeId)
instead of
getPartyContactMechValueMaps(Delegator delegator, String partyId, boolean showOld, String contactMechTypeId)
to offert also more possibility to resolve at date instead just use now or all.
icing on the cake, I added groovy test to control this worker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838349 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9322)
This is the first commit to removed dependencies on the ecommerce plugin data
by moving the following files to applications:
- DemoStandardCosting to applications/accounting/data/
- DemoOrderPeopleData.xml to applications/order/data/
- DemoOrderTestData.xml to applications/order/data/
- DemoProduct.xml to applications/order/data/
- DemoRentalShipping.xml to applications/order/data/
- DemoShipping.xml to applications/order/data/
Also modified some data on the below files to fix dependency order
- applications/product/data/ProductDemoData.xml
(move facility data needed for tests from plugins)
- applications/marketing/data/sfaDemoData.xml
(move data to DemoOrderPeopleData.xml)
- applications/party/testdef/data/PartyTestsData.xml
(status does not exist)
- applications/workeffort/testdef/data/WorkEffortTestData.xml
(status does not exist)
- applications/workeffort/minilang/test/WorkEffortTests.xml
(depends on planHours which is defined in project componnent)
And finally updated the below component files with the moved data
- applications/order/ofbiz-component.xml
- applications/accounting/ofbiz-component.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792866 13f79535-47bb-0310-9956-ffa450edef68