As reported by Martin Kreidenweis
The conditions don't work when updating (not creating) entities using the Delegator.storeAll() method. E.g. the following condition does not work:
<eca entity="Product" operation="create-store" event="return">
<condition field-name="autoCreateKeywords" operator="not-equals" value="N"/>
<action service="indexProductKeywords" mode="sync" value-attr="productInstance"/>
</eca>
The indexProductKeywords service is called anyway when the product is updated and the autoCreateKeywords was "N" and stays "N". It works correctly for newly created products.
The problem is in the method GenericDelegator.storeAll(), where unchanged field values are not passed down to the store() method. The store method calls the ECA engine, which does not receive the unchanged values at all and thus cannot evaluate the EECA conditions correctly.
Scott's comment:We could consider having EntityEcaCondition.eval() perform a db lookup if any of the fields it needs to evaluate are missing. If they are missing it could fully populate the entity with the missing fields so that a lookup is only required at most once per delegator operation. If no ECA conditions require any missing fields then the lookup wouldn't be performed, so the performance penalty would only be incurred when necessary.
Anne: I've created a patch modeled after Scott's suggestion. I'd appreciate someone reviewing it. It does work for me, however I am concerned that it might fail when the value of a field that is part of the EECA condition is being changed from non-null to null using GenericDelegator.storeAll, because of the way storeAll works. There may be a simple solution I've missed.
jleroux: After reviewing and waiting for Anne's feedback, I commit because even if in some cases it would not work it's at least better than current situation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716319 13f79535-47bb-0310-9956-ffa450edef68
Rerported by Thanakrit Wongyued
I found problem to display product category name in Unicode (Thai UTF-8) . The problem is services in CategoryContentWrapper are create content mimeType in "text/html". Then i try to fixed this problem by replace "text/html" with "text/html; charset=utf-8". After that i recompile and restart OFBiz the problem is disappear.
jleroux: uses a new defaultMimeType content property, defaulting to "text/html; charset=utf-8", retrieved by EntityUtilProperties.getPropertyValue()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716261 13f79535-47bb-0310-9956-ffa450edef68
* DataResourceAttribute
* ContentRole (not for create will set on second step)
* ContentMetaData
* ContentOperation
* ContentPurpose
* ContentPurposeOperation
* ContentAttribute
* ContentKeyword
* ContentType
* ContentAssocType
* ContentAssocPredicate
* ContentPurposeType
I also move some service definition from file services.xml to services_content.xml for all entities that concern content
relate issue OFBIZ-6745
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715960 13f79535-47bb-0310-9956-ffa450edef68
jleroux:
Added
bottom note (in both lists now)
title="${uiLabelMap.ProductProductId}"
title="${uiLabelMap.ProductProductIdTo}"
fromDate <date-time default-value="${nowTimestamp}"
tooltip="${uiLabelMap.ProductRecreateAssociation}"
Removed
EditProductAssoc.ftl
old screen with ftl ref in screen (commented out by Christian)
UNUSED FORMS comment
Product column when same than picked (depend on iterate-section)
I liked the idea of changing the main product using a lookup in edit part.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715755 13f79535-47bb-0310-9956-ffa450edef68
jleroux: This initially was my error in r1705417, So I simply reverted the change in r1715536 done for OFBIZ-6742 and also reverted r1705417 in this file. I will check other changes done in r1705417
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715573 13f79535-47bb-0310-9956-ffa450edef68
============================================================
- Added session cookies config for ecommerce,ecomseo and ecomclone web.xml.
- Used web-app 3.0 version for web-app
- Re-arrange description and display-name attribute as per the web-app structure.
Thanks Rahul for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715506 13f79535-47bb-0310-9956-ffa450edef68
============================================================
Layout improvement for showing cart properly on order entry page for bizznesstime theme.
Thanks Aditya for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715504 13f79535-47bb-0310-9956-ffa450edef68
============================================================
Fixed Missing userLogin error on party profile screen when 1st content is non public.
Thanks Jacques for reporting the issue :) and Thanks Vishal for providing the patch for the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715501 13f79535-47bb-0310-9956-ffa450edef68
===========================================================
Currently the quote report (or print) opens in the same
window. This should be in a new window(target = _BLANK)
Thanks Pierre Smits for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715494 13f79535-47bb-0310-9956-ffa450edef68
Type-ahead regarding requirement in ListWorkEffortRequirements throws an error.
Thanks Pierre for reporting the issue and thanks Jitendra for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1715482 13f79535-47bb-0310-9956-ffa450edef68
I did review all createPartyRole service call in java/minilang/groovy, and replace some of the occurence with ensurePartyRole, one in SubscriptionServices.java that could cause issue, and others to ease the readability.
Thanks Taher for reporting
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714976 13f79535-47bb-0310-9956-ffa450edef68
The project manager returns an error on the main page unless every user is added to every single project. It should return a list of just the projects the user is assigned to.
:ERROR MESSAGE:
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.IllegalArgumentException: Error running Groovy script at location [component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy]: org.ofbiz.service.ServiceAuthException: You have no access to the project#: 10040 (Error running Groovy script at location [component://projectmgr/webapp/projectmgr/WEB-INF/actions/ListCurrentProjects.groovy]: org.ofbiz.service.ServiceAuthException: You have no access to the project#: 10040)
It defeats the point.
Mansour:
Pierre,
The patch seems to restrict access to this scree to "PROJECTMGR_ADMIN".
I am not sure if this issue is to be resolved in the screen or making the service returns projects the user has access to.
I appreciate your help here.
Pierre:
Hi Mansour,
You are right. The patch indeed does that and returns a blank screen for
users other than with access 'PROJECTMGR_ADMIN. Other users can look at
projects which will show projects the user is a member of.
jleroux:
I did not test all, but because of ListCurrentProjects.groovy, it seems to me that this is a better solution
I added the CommonAsk label to help lambda users better understand the situation (by asking :p)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714415 13f79535-47bb-0310-9956-ffa450edef68
Setting Require Inventory for a Marketing Product and (or ???) its Marketing Component causes the shiping system to fail. The shipping system reports nothing is ready to ship, ( [0 + 0 = 0] < 1 ).
---- exception report ----------------------------------------------------------
[TransactionUtil.setRollbackOnly] Calling transaction setRollbackOnly; this stack trace shows where this is happening:
Exception: java.lang.Exception
Message: Error in simple-method [Quick ships an entire order from multiple facilities [file:/wrk/ofbiz/ofbiz/applications/
product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml#quickShipEntireOrder]]: ; [Warning: no shipments created;
could not find anything ready and needing to be shipped.]
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Error in simple-method [Quick ships an entire order from multiple facilities [file:/wrk/ofbiz/ofbiz/
applications/product/script/org/ofbiz/shipment/shipment/ShipmentServices.xml#quickShipEntireOrder]]: ; [Warning: no shipments
created; could not find anything ready and needing to be shipped.]
Swapnil Shah
As per further testing over trunk, it is found that setting requireInventory=Y over any marketing package type product means that for component products as well it would get honored even if its not set as Y for each or any of the components.
In other words say,
* The flag is as set as Y for a marketing package type product A and it has ATP/QOH=15/15
* Product A has two component B & C as finished good and each having ATP/QOH = 8/8 and requireInventory is not set as Y for any of the components.
* If sales order is attempted to be placed for A with ordered qty = 10 then system won't allow it to be placed because component B & C don't have sufficient ATP (irrespective of fact that none of them have requireInventory=Y)
Expected behavior in above case should be to allow user to place the order for Product A as it has sufficient ATP=15 to fulfill the ordered qty=10. If the ordered qty happens to exceed 15 then only it should prevent ordering based on requireInventory=Y
Ideally we shouldn't use the MARKETING_PKG product types as its a parent product type for product types MARKETING_PKG_AUTO, MARKETING_PKG_PICK. Thus we have changed the logic in "getMktgPackagesAvailable" service to handle product types MARKETING_PKG_AUTO, MARKETING_PKG_PICK to handle the reported issues more gracefully. Following are the changes we have done in the service vis-a-vis RequireInventory=Y setting for Package and/or its components. Now at the time of add to cart :
# if product type is MARKETING_PKG_AUTO then system will check it's own ATP instead of checking it's component ATP to allow or prevent placing order for package product..
# If product type is MARKETING_PKG_PICK then system will check it's component ATP to allow or prevent placing order for package product.
jleroux:
I agree with Swapnil,, since we can receive inventories of MARKETING_PKG_AUTO, without regard to their components availability, I see no reasons why we could not ship them.
BTW I tried the same with MARKETING_PKG_PICK and it works as expected: you need to have the components at hand to ship them even if you tried to receive an inventory before. Since they need to be picked this makes sense.
While at it I fixed a related French label, so it will be backported as well...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714410 13f79535-47bb-0310-9956-ffa450edef68
org.ofbiz.common.login.LoginServices.userLogin is returning ERROR when a username or password is incorrect. It should return FAILURE instead of error. The error causes stack track to be printed to the log. The stack trace makes watching the log for actual errors difficult. This is especially hard when running and analyzing the log after a full test run, of in my case, a custom set of test cases.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714244 13f79535-47bb-0310-9956-ffa450edef68
The demo data set (in location /framework/entity/data/TenantDemoData.xml) contains elements to load the tenants DEMO1 and DEMO2 into the implemented OFBiz setup.
This data set is intended to be loaded into the master tables when a user wants to explore multity tenancy. However, when a user also wants/needs to load demo data into the tenant DEMO1 or DEMO2 OFBiz also tries to upload the demo setup data for each tenant. This is not allowed as tenants do not have access to tables:
# Tenant
# Tenantdatasource
# etc
jleroux: (based on a Pierre's comment)
With
./ant create-tenant
and
./ant load-tenant-data-readers
We provide enough tools to explore the opportunity to demonstrate the multi-tenancy aspects of OFBiz.
Moreover OFBIZ-6720 will be used to rewrite the multi-tenant support page in wiki. We will then see if we should not remove old ant tenant related targets now useless
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1714085 13f79535-47bb-0310-9956-ffa450edef68
Removes useless commented out code in UtilCodec.java
Replaces a tab by spaces in ContextFilter.java
Removes useless line and replaces tabs by spaces in OFBizSolrContextFilter.java (annoying in compare)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713991 13f79535-47bb-0310-9956-ffa450edef68