svn commit: r557253 - in /ofbiz/trunk/applications/party: webapp/partymgr/WEB-INF/ webapp/partymgr/WEB-INF/actions/communication/ webapp/partymgr/communication/ widget/partymgr/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r557253 - in /ofbiz/trunk/applications/party: webapp/partymgr/WEB-INF/ webapp/partymgr/WEB-INF/actions/communication/ webapp/partymgr/communication/ widget/partymgr/

rayb-2
Author: rayb
Date: Wed Jul 18 06:12:35 2007
New Revision: 557253

URL: http://svn.apache.org/viewvc?view=rev&rev=557253
Log:
Party Mgr Communication event bug fix, thanks to Bilgin Ibryam : OFBIZ-1158

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/findCommEventContactMechs.bsh
    ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
    ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
    ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/findCommEventContactMechs.bsh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/findCommEventContactMechs.bsh?view=diff&rev=557253&r1=557252&r2=557253
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/findCommEventContactMechs.bsh (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/findCommEventContactMechs.bsh Wed Jul 18 06:12:35 2007
@@ -29,16 +29,19 @@
 
 delegator = request.getAttribute("delegator");
 userLogin = request.getAttribute("userLogin");
+partyIdFrom = context.get("partyIdFrom");
+partyIdTo = context.get("partyIdTo");
 
 if (parameters.get("communicationEventTypeId") != null) {
    if (parameters.get("communicationEventTypeId").equals("EMAIL_COMMUNICATION")) {
-      userEmailAddresses = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("contactMechTypeId", "EMAIL_ADDRESS", "partyId", userLogin.getString("partyId")));
+      userEmailAddresses = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("contactMechTypeId", "EMAIL_ADDRESS", "partyId",  partyIdFrom));
       userEmailAddresses = EntityUtil.filterByDate(userEmailAddresses, UtilDateTime.nowTimestamp(), "contactFromDate", "contactThruDate", true);
       context.put("userEmailAddresses", userEmailAddresses);    
       
-      targetEmailAddresses = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("contactMechTypeId", "EMAIL_ADDRESS", "partyId", parameters.get("partyId")));
+      targetEmailAddresses = delegator.findByAnd("PartyContactWithPurpose", UtilMisc.toMap("contactMechTypeId", "EMAIL_ADDRESS", "partyId", partyIdTo));
       targetEmailAddresses = EntityUtil.filterByDate(targetEmailAddresses, UtilDateTime.nowTimestamp(), "contactFromDate", "contactThruDate", true);
       context.put("targetEmailAddresses", targetEmailAddresses);    
    }
 }
+
 

Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml?view=diff&rev=557253&r1=557252&r2=557253
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/controller.xml Wed Jul 18 06:12:35 2007
@@ -940,6 +940,7 @@
     <request-map uri="LookupWorkEffort"><security https="true" auth="true"/><response name="success" type="view" value="LookupWorkEffort"/></request-map>
     <request-map uri="LookupContent"><security auth="true" https="true"/><response name="success" type="view" value="LookupContent"/></request-map>
     <request-map uri="LookupDataResource"><security auth="true" https="true"/><response name="success" type="view" value="LookupDataResource"/></request-map>
+    <request-map uri="LookupPreferredContactMech"><security https="true" auth="true"/><response name="success" type="view" value="LookupPreferredContactMech"/></request-map>
     
     <!-- end of request mappings -->
 
@@ -1026,7 +1027,7 @@
     <view-map name="LookupCommEvent" type="screen" page="component://party/widget/partymgr/LookupScreens.xml#LookupCommEvent"/>
     <view-map name="LookupWorkEffort" type="screen" page="component://workeffort/widget/LookupScreens.xml#LookupWorkEffort"/>    
     <view-map name="LookupCustRequest" type="screen" page="component://order/widget/ordermgr/LookupScreens.xml#LookupCustRequest"/>
-
+    <view-map name="LookupPreferredContactMech" type="screen" page="component://marketing/widget/ContactListScreens.xml#LookupPreferredContactMech"/>
     <view-map name="LookupContactList" type="screen" page="component://party/widget/partymgr/PartyContactListScreens.xml#ListLookupContactList"/>
     <view-map name="LookupContent" page="component://content/widget/content/ContentScreens.xml#LookupContent" type="screen"/>
     <view-map name="LookupDataResource" page="component://content/widget/content/DataResourceScreens.xml#LookupDataResource" type="screen"/>

Modified: ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml?view=diff&rev=557253&r1=557252&r2=557253
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/communication/CommForms.xml Wed Jul 18 06:12:35 2007
@@ -90,7 +90,8 @@
             </drop-down>            
         </field>
         <field name="contactMechIdFrom" title="${uiLabelMap.PartyFromContactMech}"
-            use-when="(parameters.get(&quot;communicationEventTypeId&quot;)==null)||!(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))"><text/></field>
+            use-when="(parameters.get(&quot;communicationEventTypeId&quot;)==null)||!(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))">
+            <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdFrom"/></field>
         <!-- TODO: somehow show the address or email here, rather than just a contactMechId -->
         <field name="contactMechIdTo" title="${uiLabelMap.PartyToEmailAddress}"
             use-when="(parameters.get(&quot;communicationEventTypeId&quot;)!=null)&amp;&amp;(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))">
@@ -99,7 +100,8 @@
             </drop-down>            
         </field>
         <field name="contactMechIdTo" title="${uiLabelMap.PartyToContactMech}"
-            use-when="(parameters.get(&quot;communicationEventTypeId&quot;)==null)||!(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))"><text/></field>
+            use-when="(parameters.get(&quot;communicationEventTypeId&quot;)==null)||!(parameters.get(&quot;communicationEventTypeId&quot;).equals(&quot;EMAIL_COMMUNICATION&quot;))">
+            <lookup target-form-name="LookupPreferredContactMech" target-parameter="partyIdTo"/></field>
         <field name="roleTypeIdFrom" use-when="commEventRoleTypeIdFrom!=null">
             <drop-down no-current-selected-key="_NA_">
                 <entity-options description="${description}" entity-name="RoleType" key-field-name="roleTypeId">

Modified: ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml?view=diff&rev=557253&r1=557252&r2=557253
==============================================================================
--- ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml (original)
+++ ofbiz/trunk/applications/party/widget/partymgr/CommunicationScreens.xml Wed Jul 18 06:12:35 2007
@@ -256,7 +256,7 @@
 
                 <set field="partyId" from-field="parameters.partyId"/>
                 <set field="partyIdFrom" from-field="parameters.partyIdFrom" default-value="${userLogin.partyId}"/>
-                <set field="partyIdTo" from-field="parameters.partyId" default-value="${userLogin.partyId}"/>
+                <set field="partyIdTo" from-field="parameters.partyIdTo" default-value="${userLogin.partyId}"/>
                 <set field="contactMechIdFrom" from-field="parameters.contactMechIdFrom"/>
                 <set field="contactMechIdTo" from-field="parameters.contactMechIdTo"/>
                 <set field="contactMechTypeId" from-field="parameters.contactMechTypeId"/>