You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2015/09/22 10:31:48 UTC

svn commit: r1704478 - in /ofbiz/trunk/applications: order/webapp/ordermgr/order/orderitems.ftl order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl product/webapp/catalog/imagemanagement/showPeopleApprove.ftl

Author: jleroux
Date: Tue Sep 22 08:31:46 2015
New Revision: 1704478

URL: http://svn.apache.org/viewvc?rev=1704478&view=rev
Log:
An enhanced patch from Pierre Smits for "Order items for GZ-1006-5 via ecommerce/ordermgr shows error" https://issues.apache.org/jira/browse/OFBIZ-6643

When an order is entered via the ecommerce component for a GZ-1006-5 an error is shown in the order items section

jleroux: actually, as Vyom Jain suggested "This is happening due to changes OFBIZ-6276. Either r1704108 should be reverted or additional patches be provided to avoid this reported issue (which is only one of them). Removing deprecated delegator methods require thorough testing as many as used in scripts and templates." I checked there was only 3 such changes for findByAnd and no others but getRelated where called in *.ftl and *.groovy. This completes the findByAnd case I will create a new Jira for the rest (did not check already, 238 cases!)

Modified:
    ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
    ofbiz/trunk/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl
    ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl?rev=1704478&r1=1704477&r2=1704478&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/order/orderitems.ftl Tue Sep 22 08:31:46 2015
@@ -81,7 +81,13 @@ under the License.
                                         </#if>
                                     </div>
                                     <div style="float:right;">
-                                        <#assign downloadContents = delegator.findByAnd("OrderItemAndProductContentInfo", {"orderId" : orderId, "orderItemSeqId" : orderItem.orderItemSeqId, "productContentTypeId" : "DIGITAL_DOWNLOAD", "statusId" : "ITEM_COMPLETED"})/>
+                                        <#assign downloadContents = delegator.findByAnd("OrderItemAndProductContentInfo", {
+                                                                                        "orderId" : orderItem.orderId, 
+                                                                                        "orderItemSeqId" : orderItem.orderItemSeqId, 
+                                                                                        "productContentTypeId" : "DIGITAL_DOWNLOAD", 
+                                                                                        "statusId" : "ITEM_COMPLETED"},
+                                                                                        null,
+                                                                                        false)/>
                                         <#if downloadContents?has_content>
                                             <#list downloadContents as downloadContent>
                                                 <a href="/content/control/ViewSimpleContent?contentId=${downloadContent.contentId}" class="buttontext" target="_blank">${uiLabelMap.ContentDownload}</a>&nbsp;

Modified: ofbiz/trunk/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl?rev=1704478&r1=1704477&r2=1704478&view=diff
==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/quote/ViewQuoteItemInfo.ftl Tue Sep 22 08:31:46 2015
@@ -72,7 +72,7 @@ under the License.
                             ${quoteItem.quoteItemSeqId}
                         </#if>
                         </div>
-                        <#assign quoteTerms = delegator.findByAnd("QuoteTerm", {"quoteId" : quoteItem.quoteId, "quoteItemSeqId" : quoteItem.quoteItemSeqId})>
+                        <#assign quoteTerms = delegator.findByAnd("QuoteTerm", {"quoteId" : quoteItem.quoteId, "quoteItemSeqId" : quoteItem.quoteItemSeqId}, null, false)>
                     </td>
                     <td valign="top">
                         <div>

Modified: ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl?rev=1704478&r1=1704477&r2=1704478&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/imagemanagement/showPeopleApprove.ftl Tue Sep 22 08:31:46 2015
@@ -1,91 +1,91 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
-<script type="text/javascript">
-jQuery.noConflict();
-jQuery(document).ready(function(){
-    jQuery('input:radio').click(function(){
-        var elementVal = jQuery(this).val();
-        var elementList = elementVal.split('__');
-        var result = elementList[0] + "/" + elementList[1];
-        jQuery('input:radio[value=' + result + ']').attr('checked',true);
-    });
-    jQuery('input:radio[value^="IM_APPROVED"]').each( function() {
-        this.checked = true;
-    });
-});
-</script>
-        
-<table>
-    <#if partyRoles?has_content>
-        <#assign alt_row = false>
-        <#list partyRoles as partyRole>
-            <td>
-                <table>
-                    <#assign userLoginApprovers  = delegator.findByAnd("UserLogin",Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", partyRole.partyId))/>
-                    <#assign userLoginApprover = userLoginApprovers[0]>
-                    <#assign userLoginAndPartyDetails = delegator.findOne("UserLoginAndPartyDetails", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", userLoginApprover.partyId, "userLoginId", userLoginApprover.userLoginId), false)!>
-                    <#if userLoginAndPartyDetails?has_content>
-                        <#assign partyContentDetail  = delegator.findByAnd("ContentApproval",Static["org.ofbiz.base.util.UtilMisc"].toMap("roleTypeId", "IMAGEAPPROVER", "approvalStatusId", "IM_PENDING", "partyId", userLoginAndPartyDetails.partyId))/>
-                        <#assign imageApproveSize = partyContentDetail.size()>
-                        <#if userLoginAndPartyDetails.userLoginId == userLogin.userLoginId>
-                            <#if userMap.checkUser == userLoginAndPartyDetails.userLoginId>
-                                <td>
-                                    <div>
-                                        <b>${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</b>&nbsp;&nbsp;|&nbsp;&nbsp;
-                                    </div>
-                                </td>
-                            <#else>
-                                <td>
-                                    <div>
-                                        <b><a href="<@o...@ofbizUrl>" class="text">${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</a></b>&nbsp;&nbsp;|&nbsp;&nbsp;
-                                    </div>
-                                </td>
-                            </#if>
-                        <#else>
-                            <#if userMap.checkUser == userLoginAndPartyDetails.userLoginId>
-                                <td>
-                                    <div>
-                                        <b>${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</b>&nbsp;&nbsp;|&nbsp;&nbsp;
-                                    </div>
-                                </td>
-                            <#else>
-                                <td>
-                                    <div>
-                                        <b><a href="<@o...@ofbizUrl>" class="text">${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</a></b>&nbsp;&nbsp;|&nbsp;&nbsp;
-                                    </div>
-                                </td>
-                            </#if>
-                        </#if>
-                    </#if>
-                </table>
-            </td>
-        </#list>
-        <#if userMap.checkUser == "REJECTED">
-            <td>
-                <div><b>Rejected</b></div>
-            </td>
-        <#else>
-            <td>
-                <div><b><a href="<@o...@ofbizUrl>" class="text">Rejected</a></b></div>
-            </td>
-        </#if>
-    </#if>
-</table>
-<br/>
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<script language="javascript" type="text/javascript" src="<@o...@ofbizContentUrl>"></script>
+<script type="text/javascript">
+jQuery.noConflict();
+jQuery(document).ready(function(){
+    jQuery('input:radio').click(function(){
+        var elementVal = jQuery(this).val();
+        var elementList = elementVal.split('__');
+        var result = elementList[0] + "/" + elementList[1];
+        jQuery('input:radio[value=' + result + ']').attr('checked',true);
+    });
+    jQuery('input:radio[value^="IM_APPROVED"]').each( function() {
+        this.checked = true;
+    });
+});
+</script>
+        
+<table>
+    <#if partyRoles?has_content>
+        <#assign alt_row = false>
+        <#list partyRoles as partyRole>
+            <td>
+                <table>
+                    <#assign userLoginApprovers  = delegator.findByAnd("UserLogin",Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", partyRole.partyId), null, false)/>
+                    <#assign userLoginApprover = userLoginApprovers[0]>
+                    <#assign userLoginAndPartyDetails = delegator.findOne("UserLoginAndPartyDetails", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId", userLoginApprover.partyId, "userLoginId", userLoginApprover.userLoginId), false)!>
+                    <#if userLoginAndPartyDetails?has_content>
+                        <#assign partyContentDetail  = delegator.findByAnd("ContentApproval",Static["org.ofbiz.base.util.UtilMisc"].toMap("roleTypeId", "IMAGEAPPROVER", "approvalStatusId", "IM_PENDING", "partyId", userLoginAndPartyDetails.partyId), null, false)/>
+                        <#assign imageApproveSize = partyContentDetail.size()>
+                        <#if userLoginAndPartyDetails.userLoginId == userLogin.userLoginId>
+                            <#if userMap.checkUser == userLoginAndPartyDetails.userLoginId>
+                                <td>
+                                    <div>
+                                        <b>${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</b>&nbsp;&nbsp;|&nbsp;&nbsp;
+                                    </div>
+                                </td>
+                            <#else>
+                                <td>
+                                    <div>
+                                        <b><a href="<@o...@ofbizUrl>" class="text">${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</a></b>&nbsp;&nbsp;|&nbsp;&nbsp;
+                                    </div>
+                                </td>
+                            </#if>
+                        <#else>
+                            <#if userMap.checkUser == userLoginAndPartyDetails.userLoginId>
+                                <td>
+                                    <div>
+                                        <b>${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</b>&nbsp;&nbsp;|&nbsp;&nbsp;
+                                    </div>
+                                </td>
+                            <#else>
+                                <td>
+                                    <div>
+                                        <b><a href="<@o...@ofbizUrl>" class="text">${userLoginAndPartyDetails.firstName!} ${userLoginAndPartyDetails.middleName!} ${userLoginAndPartyDetails.lastName!} (${imageApproveSize})</a></b>&nbsp;&nbsp;|&nbsp;&nbsp;
+                                    </div>
+                                </td>
+                            </#if>
+                        </#if>
+                    </#if>
+                </table>
+            </td>
+        </#list>
+        <#if userMap.checkUser == "REJECTED">
+            <td>
+                <div><b>Rejected</b></div>
+            </td>
+        <#else>
+            <td>
+                <div><b><a href="<@o...@ofbizUrl>" class="text">Rejected</a></b></div>
+            </td>
+        </#if>
+    </#if>
+</table>
+<br/>