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 2007/07/07 22:13:03 UTC

svn commit: r554250 - in /ofbiz/trunk/applications/party: entitydef/entitymodel.xml src/org/ofbiz/party/communication/CommunicationEventServices.java

Author: jleroux
Date: Sat Jul  7 13:13:02 2007
New Revision: 554250

URL: http://svn.apache.org/viewvc?view=rev&rev=554250
Log:
A patch from Bilgin Ibryam "Filtering expired emails in sendEmailToContactList method" (https://issues.apache.org/jira/browse/OFBIZ-1054)

Modified:
    ofbiz/trunk/applications/party/entitydef/entitymodel.xml
    ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java

Modified: ofbiz/trunk/applications/party/entitydef/entitymodel.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/entitydef/entitymodel.xml?view=diff&rev=554250&r1=554249&r2=554250
==============================================================================
--- ofbiz/trunk/applications/party/entitydef/entitymodel.xml (original)
+++ ofbiz/trunk/applications/party/entitydef/entitymodel.xml Sat Jul  7 13:13:02 2007
@@ -1207,9 +1207,15 @@
         package-name="org.ofbiz.party.contact">
         <member-entity entity-alias="CLP" entity-name="ContactListParty"/>
         <member-entity entity-alias="CM" entity-name="ContactMech"/>
+        <member-entity entity-alias="PCM" entity-name="PartyContactMech"/>        
         <alias-all entity-alias="CLP"/>
         <alias-all entity-alias="CM"/>
+        <alias entity-alias="PCM" name="contactFromDate" field="fromDate"/>
+        <alias entity-alias="PCM" name="contactThruDate" field="thruDate"/>
         <view-link entity-alias="CLP" rel-entity-alias="CM">
+            <key-map field-name="preferredContactMechId" rel-field-name="contactMechId"/>
+        </view-link>
+        <view-link entity-alias="CLP" rel-entity-alias="PCM">
             <key-map field-name="preferredContactMechId" rel-field-name="contactMechId"/>
         </view-link>
         <relation type="one-nofk" rel-entity-name="ContactListParty">

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java?view=diff&rev=554250&r1=554249&r2=554250
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Sat Jul  7 13:13:02 2007
@@ -168,7 +168,7 @@
                         new EntityExpr("contactListId", EntityOperator.EQUALS, contactList.get("contactListId")),
                         new EntityExpr("statusId", EntityOperator.EQUALS, "CLPT_ACCEPTED"),
                         new EntityExpr("preferredContactMechId", EntityOperator.NOT_EQUAL, null),
-                        EntityUtil.getFilterByDateExpr()
+                        EntityUtil.getFilterByDateExpr(), EntityUtil.getFilterByDateExpr("contactFromDate", "contactThruDate")
                         );
             EntityConditionList conditions = new EntityConditionList(conditionList, EntityOperator.AND);
             List fieldsToSelect = UtilMisc.toList("infoString");