This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a change to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git. from 203fa5f Implemented: Support Freemarker square interpolation syntax (OFBIZ-12099) new 1cc035d Documented: why not upgrading org.jdom:jdom:1.1.3 new 3cdd1fc Fixed: Issue in creating promotion action (OFBIZ-11168) new 6110ced Fixed: Unique form names for promo actions (OFBIZ-12082) The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../product/template/promo/EditProductPromoRules.ftl | 19 ++++++++++++------- build.gradle | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) |
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit 1cc035db22dff7ddb038c09207d614affacdc589 Author: Jacques Le Roux <[hidden email]> AuthorDate: Sun Dec 20 17:10:07 2020 +0100 Documented: why not upgrading org.jdom:jdom:1.1.3 Better comment --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 86b20f8..b6e38b9 100644 --- a/build.gradle +++ b/build.gradle @@ -202,7 +202,7 @@ dependencies { implementation 'oro:oro:2.0.8' implementation 'wsdl4j:wsdl4j:1.6.3' implementation 'com.auth0:java-jwt:3.11.0' - implementation 'org.jdom:jdom:1.1.3' // don't upgrade above, makes a lot of not obvious and useless complications, see last commit of OFBIZ-12092 for more + implementation 'org.jdom:jdom:1.1.3' // don't upgrade above 1.1.3, makes a lot of not obvious and useless complications, see last commits of OFBIZ-12092 for more testImplementation 'org.hamcrest:hamcrest-library:2.2' // Enable junit4 to not depend on hamcrest-1.3 testImplementation 'org.mockito:mockito-core:3.6.28' |
In reply to this post by jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit 3cdd1fcec74dc85f20455d449d809a1c482e4165 Author: Jacques Le Roux <[hidden email]> AuthorDate: Fri Dec 25 16:09:43 2020 +0100 Fixed: Issue in creating promotion action (OFBIZ-11168) The issue reported there was fixed with OFBIZ-11058. But there was still an issue in logI reported in a comment. The problem was that <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)> was used in 2 places where it should not have been because it returned a null value that can't be handled by OFBiz. Better use <#assign productPromoActionCustomMethod = productPromoAction.getRelatedOne("CustomMethod", true)> and productPromoAction.getRelatedOne("ActionEnumeration", true))?? The repercussion was that the description was not used but the Id and the log was showing an error. --- .../product/template/promo/EditProductPromoRules.ftl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/applications/product/template/promo/EditProductPromoRules.ftl b/applications/product/template/promo/EditProductPromoRules.ftl index 757f884..facd7f3 100644 --- a/applications/product/template/promo/EditProductPromoRules.ftl +++ b/applications/product/template/promo/EditProductPromoRules.ftl @@ -291,8 +291,14 @@ under the License. <input type="hidden" name="productPromoActionSeqId" value="${(productPromoAction.productPromoActionSeqId)!}" /> <select name="customMethodId" size="1"> <#if (productPromoAction.customMethodId)??> - <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)> - <option value="${(productPromoAction.customMethodId)!}"><#if productPromoActionCurEnum??>${(productPromoActionCurEnum.get("description",locale))!}<#else>[${(productPromoAction.customMethodId)!}]</#if></option> + <#assign productPromoActionCustomMethod = productPromoAction.getRelatedOne("CustomMethod", true)> + <option value="${(productPromoAction.customMethodId)!}"> + <#if (productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true))??> + ${(productPromoActionCurEnum.get("description",locale))!} + <#else> + ${(productPromoActionCustomMethod.get("description",locale))!} + </#if> + </option> <option value="${(productPromoAction.customMethodId)!}"> </option> <#elseif (productPromoAction.productPromoActionEnumId)??> <#assign actionEnumeration = productPromoAction.getRelatedOne("ActionEnumeration", true)! /> @@ -317,7 +323,6 @@ under the License. ${uiLabelMap.UseCartQuantity}: <select name="useCartQuantity"> <#if (productPromoAction.useCartQuantity)??> - <#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)> <option value="${(productPromoAction.useCartQuantity)!}"><#if ("Y" == productPromoAction.useCartQuantity)>${uiLabelMap.CommonY}<#else>${uiLabelMap.CommonN}</#if></option> <option value="${(productPromoAction.useCartQuantity)!}"> </option> <#else> @@ -392,7 +397,7 @@ under the License. <div> ${(actionProduct.internalName)!} [${actionProductPromoProduct.productId}] - ${(actionApplEnumeration.get("description",locale))?default(actionProductPromoProduct.productPromoApplEnumId)} - <form name="deleteProductPromoProductAction_${productPromoRule_index}_${productPromoAction_index}_${actionProductPromoProduct_index}" method="post" action="<@ofbizUrl>deleteProductPromoProduct</@ofbizUrl>"> + <form name="deleteProductPromoProductAction_${productPromoRule_index}_${productPromoAction_index}_${actionProductPromoProduct_index}" method="post" action="<@ofbizUrl>deleteProductPromoProduct</@ofbizUrl>"> <input type="hidden" name="productPromoId" value="${(actionProductPromoProduct.productPromoId)!}" /> <input type="hidden" name="productPromoRuleId" value="${(actionProductPromoProduct.productPromoRuleId)!}" /> <input type="hidden" name="productPromoCondSeqId" value="${(actionProductPromoProduct.productPromoCondSeqId)!}" /> |
In reply to this post by jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git commit 6110ced974c686a82bf3747430ea70e4541366b2 Author: Jacques Le Roux <[hidden email]> AuthorDate: Fri Dec 25 16:17:35 2020 +0100 Fixed: Unique form names for promo actions (OFBIZ-12082) Creating a promo with multiple rules and actions results in an exception. It's reproducible by creating a promo with 1 rule and more than 1 Action and specifying different products for each Action. When creating the second Action and trying to specify another product to included the ajax request LookupProduct will fail because it included both product ids in its xhr request. Thanks: Danny Trunk --- applications/product/template/promo/EditProductPromoRules.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/product/template/promo/EditProductPromoRules.ftl b/applications/product/template/promo/EditProductPromoRules.ftl index facd7f3..08bea18 100644 --- a/applications/product/template/promo/EditProductPromoRules.ftl +++ b/applications/product/template/promo/EditProductPromoRules.ftl @@ -285,7 +285,7 @@ under the License. <td> <div> <b> ${uiLabelMap.ProductAction} ${(productPromoAction.productPromoActionSeqId)!}</b> - <form method="post" action="<@ofbizUrl>updateProductPromoAction</@ofbizUrl>" name="updateProductPromoAction"> + <form method="post" action="<@ofbizUrl>updateProductPromoAction</@ofbizUrl>" name="updateProductPromoAction_${productPromoRule_index}_${productPromoAction_index}"> <input type="hidden" name="productPromoId" value="${(productPromoAction.productPromoId)!}" /> <input type="hidden" name="productPromoRuleId" value="${(productPromoAction.productPromoRuleId)!}" /> <input type="hidden" name="productPromoActionSeqId" value="${(productPromoAction.productPromoActionSeqId)!}" /> @@ -315,9 +315,9 @@ under the License. ${uiLabelMap.ProductQuantity}: <input type="text" size="5" name="quantity" value="${(productPromoAction.quantity)!}" /> ${uiLabelMap.ProductAmount}: <input type="text" size="5" name="amount" value="${(productPromoAction.amount)!}" /> <br/> - ${uiLabelMap.ProductItemId}: <@htmlTemplate.lookupField value="${(productPromoAction.productId)!}" formName="updateProductPromoAction" name="productId" id="productId" fieldFormName="LookupProduct"/> + ${uiLabelMap.ProductItemId}: <@htmlTemplate.lookupField value="${(productPromoAction.productId)!}" formName="updateProductPromoAction_${productPromoRule_index}_${productPromoAction_index}" name="productId" id="productId" fieldFormName="LookupProduct"/> <br/> - ${uiLabelMap.PartyParty}: <@htmlTemplate.lookupField value="${(productPromoAction.partyId)!}" formName="updateProductPromoAction" name="partyId" id="partyId" fieldFormName="LookupUserLoginAndPartyDetails"/> + ${uiLabelMap.PartyParty}: <@htmlTemplate.lookupField value="${(productPromoAction.partyId)!}" formName="updateProductPromoAction_${productPromoRule_index}_${productPromoAction_index}" name="partyId" id="partyId" fieldFormName="LookupUserLoginAndPartyDetails"/> <br/> ${uiLabelMap.ProductServiceName}: <input type="text" size="20" name="serviceName" value="${(productPromoAction.serviceName)!}" /> ${uiLabelMap.UseCartQuantity}: |
Free forum by Nabble | Edit this page |