Return-Path: X-Original-To: apmail-ofbiz-commits-archive@www.apache.org Delivered-To: apmail-ofbiz-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8DD810705 for ; Tue, 11 Mar 2014 15:33:39 +0000 (UTC) Received: (qmail 49580 invoked by uid 500); 11 Mar 2014 15:33:37 -0000 Delivered-To: apmail-ofbiz-commits-archive@ofbiz.apache.org Received: (qmail 49539 invoked by uid 500); 11 Mar 2014 15:33:36 -0000 Mailing-List: contact commits-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list commits@ofbiz.apache.org Received: (qmail 49520 invoked by uid 99); 11 Mar 2014 15:33:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2014 15:33:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Mar 2014 15:33:32 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 30BB42388A33; Tue, 11 Mar 2014 15:33:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1576381 - in /ofbiz/branches/release12.04: ./ applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy applications/marketing/widget/MarketingReportScreens.xml Date: Tue, 11 Mar 2014 15:33:11 -0000 To: commits@ofbiz.apache.org From: jleroux@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140311153311.30BB42388A33@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jleroux Date: Tue Mar 11 15:33:10 2014 New Revision: 1576381 URL: http://svn.apache.org/r1576381 Log: "Applied fix from trunk for revision: 1576378 " ------------------------------------------------------------------------ r1576378 | jleroux | 2014-03-11 16:30:15 +0100 (mar. 11 mars 2014) | 13 lignes Fix a bug reported by Rong Nguyen "Tracking code report in Marketing doesn't work" https://issues.apache.org/jira/browse/OFBIZ-5556 I did not use Rong's proposed patch The problem was simple and due to an error I made in r703816. I then replaced -if (trackingCodeIdStr && !(trackingCodeIdStr.equals(""))) { by +if (trackingCodeIdSt) { which was wrong Then trying to fix an error reported somewhere (not mentioned) Hans went in a wrong direction with r761539+761541 So I reverted r761539+761541 and fixed the issue above in a clean way by setting the field in the calling screen. This way there are no possible issues with i10n and NPEs. ------------------------------------------------------------------------  Modified: ofbiz/branches/release12.04/ (props changed) ofbiz/branches/release12.04/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy ofbiz/branches/release12.04/applications/marketing/widget/MarketingReportScreens.xml Propchange: ofbiz/branches/release12.04/ ------------------------------------------------------------------------------ Merged /ofbiz/trunk:r1576378 Modified: ofbiz/branches/release12.04/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy?rev=1576381&r1=1576380&r2=1576381&view=diff ============================================================================== --- ofbiz/branches/release12.04/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy (original) +++ ofbiz/branches/release12.04/applications/marketing/webapp/marketing/WEB-INF/actions/reports/TrackingCodeReport.groovy Tue Mar 11 15:33:10 2014 @@ -24,23 +24,22 @@ import org.ofbiz.entity.condition.Entity import org.ofbiz.entity.condition.EntityConditionList import org.ofbiz.marketing.report.ReportHelper -trackingCodeIdStr = request.getParameter("trackingCodeId"); // query for both number of visits and number of orders visitConditionList = [] as LinkedList; orderConditionList = [] as LinkedList; -if (parameters.fromDate) { - visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, parameters.fromDate)); - orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, parameters.fromDate)); +if (fromDate) { + visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate)); + orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate)); } -if (parameters.thruDate) { - visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, parameters.thruDate)); - orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, parameters.thruDate)); +if (thruDate) { + visitConditionList.add(EntityCondition.makeCondition("fromDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate)); + orderConditionList.add(EntityCondition.makeCondition("orderDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate)); } -if (parameters.trackingCodeId) { - visitConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, parameters.trackingCodeId)); - orderConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, parameters.trackingCodeId)); +if (trackingCodeId) { + visitConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, trackingCodeId)); + orderConditionList.add(EntityCondition.makeCondition("trackingCodeId", EntityOperator.EQUALS, trackingCodeId)); } visitConditions = EntityCondition.makeCondition(visitConditionList, EntityOperator.AND); Modified: ofbiz/branches/release12.04/applications/marketing/widget/MarketingReportScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/branches/release12.04/applications/marketing/widget/MarketingReportScreens.xml?rev=1576381&r1=1576380&r2=1576381&view=diff ============================================================================== --- ofbiz/branches/release12.04/applications/marketing/widget/MarketingReportScreens.xml (original) +++ ofbiz/branches/release12.04/applications/marketing/widget/MarketingReportScreens.xml Tue Mar 11 15:33:10 2014 @@ -86,6 +86,7 @@ under the License. +