svn commit: r774216 - in /ofbiz/trunk/applications/party: servicedef/secas.xml src/org/ofbiz/party/communication/CommunicationEventServices.java

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

svn commit: r774216 - in /ofbiz/trunk/applications/party: servicedef/secas.xml src/org/ofbiz/party/communication/CommunicationEventServices.java

jaz-3
Author: jaz
Date: Wed May 13 05:50:29 2009
New Revision: 774216

URL: http://svn.apache.org/viewvc?rev=774216&view=rev
Log:
added eca for sendMailFromScreen; also now updating the subject and sent dates after mail is sent

Modified:
    ofbiz/trunk/applications/party/servicedef/secas.xml
    ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java

Modified: ofbiz/trunk/applications/party/servicedef/secas.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/secas.xml?rev=774216&r1=774215&r2=774216&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/secas.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/secas.xml Wed May 13 05:50:29 2009
@@ -60,7 +60,12 @@
         <action service="createWorkEffort" mode="sync"/>
     </eca>
 
-    <!-- email : communication event -->
+    <!-- email : create communication event -->
+    <eca service="sendMailFromScreen" event="in-validate">
+        <condition field-name="partyId" operator="is-not-empty"/>
+        <condition field-name="communicationEventId" operator="is-empty"/>        
+        <action service="createCommEventFromEmail" mode="sync" run-as-user="system"/>
+    </eca>
     <eca service="sendMailMultiPart" event="in-validate">
         <condition field-name="partyId" operator="is-not-empty"/>
         <condition field-name="communicationEventId" operator="is-empty"/>        
@@ -71,6 +76,7 @@
         <condition field-name="communicationEventId" operator="is-empty"/>      
         <action service="createCommEventFromEmail" mode="sync" run-as-user="system"/>
     </eca>
+    <!-- email : update communication event -->
     <eca service="sendMailMultiPart" event="commit">
         <condition field-name="messageWrapper" operator="is-not-empty"/>
         <condition field-name="communicationEventId" operator="is-not-empty"/>

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?rev=774216&r1=774215&r2=774216&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/communication/CommunicationEventServices.java Wed May 13 05:50:29 2009
@@ -483,8 +483,10 @@
                                                         
         Map<String, Object> commEventMap = FastMap.newInstance();
         commEventMap.put("communicationEventId", communicationEventId);
+        commEventMap.put("subject", wrapper.getSubject());
         commEventMap.put("statusId", "COM_COMPLETE");
         commEventMap.put("datetimeEnded", UtilDateTime.nowTimestamp());
+        commEventMap.put("entryDate", wrapper.getSentDate());
         commEventMap.put("messageId", wrapper.getMessageId());
         commEventMap.put("userLogin", userLogin);
         commEventMap.put("content", wrapper.getMessageBody());