You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2010/06/16 07:48:01 UTC
svn commit: r955133 - in /ofbiz/trunk/framework/common:
script/org/ofbiz/common/email/EmailServices.xml
servicedef/services_email.xml src/org/ofbiz/common/email/EmailServices.java
Author: hansbak
Date: Wed Jun 16 05:48:00 2010
New Revision: 955133
URL: http://svn.apache.org/viewvc?rev=955133&view=rev
Log:
when emails are sent out related to a custrequest, create also the link between email and custrequest (same pattern as for order)
Modified:
ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml
ofbiz/trunk/framework/common/servicedef/services_email.xml
ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
Modified: ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml?rev=955133&r1=955132&r2=955133&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml (original)
+++ ofbiz/trunk/framework/common/script/org/ofbiz/common/email/EmailServices.xml Wed Jun 16 05:48:00 2010
@@ -57,7 +57,9 @@ under the License.
<set field="emailParams.sendBcc" from-field="emailTemplateSetting.bccAddress"/>
<set field="emailParams.subject" from-field="emailTemplateSetting.subject"/>
<set field="emailParams.contentType" from-field="emailTemplateSetting.contentType" default-value="text/html"/>
-
+ <if-not-empty field="parameters.custRequestId">
+ <set field="emailParams.bodyParameters.custRequestId" from-field="parameters.custRequestId"/>
+ </if-not-empty>
<!-- copy the incoming parameter fields AFTER setting the ones from EmailTemplateSetting so they can override things like subject, sendFrom, etc -->
<set-service-fields service-name="sendMailFromScreen" map="parameters" to-map="emailParams"/>
<call-service service-name="sendMailFromScreen" in-map-name="emailParams">
Modified: ofbiz/trunk/framework/common/servicedef/services_email.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services_email.xml?rev=955133&r1=955132&r2=955133&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services_email.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services_email.xml Wed Jun 16 05:48:00 2010
@@ -43,6 +43,7 @@ under the License.
<attribute name="messageId" type="String" mode="INOUT" optional="true"/>
<attribute name="emailType" type="String" mode="INOUT" optional="true"/>
<attribute name="orderId" type="String" mode="INOUT" optional="true"/>
+ <attribute name="custRequestId" type="String" mode="INOUT" optional="true"/>
<attribute name="messageWrapper" type="org.ofbiz.service.mail.MimeMessageWrapper" mode="OUT" optional="true"/><!-- mail can be disabled in general.properties so no output -->
<!-- used for parsing and ECAs -->
<attribute name="communicationEventId" type="String" mode="INOUT" optional="true"/>
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=955133&r1=955132&r2=955133&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java Wed Jun 16 05:48:00 2010
@@ -431,6 +431,7 @@ public class EmailServices {
partyId = (String) bodyParameters.get("partyId");
}
String orderId = (String) bodyParameters.get("orderId");
+ String custRequestId = (String) bodyParameters.get("custRequestId");
bodyParameters.put("communicationEventId", serviceContext.get("communicationEventId"));
NotificationServices.setBaseUrl(dctx.getDelegator(), webSiteId, bodyParameters);
@@ -567,6 +568,9 @@ public class EmailServices {
if (UtilValidate.isNotEmpty(orderId)) {
serviceContext.put("orderId", orderId);
}
+ if (UtilValidate.isNotEmpty(custRequestId)) {
+ serviceContext.put("custRequestId", custRequestId);
+ }
if (Debug.verboseOn()) Debug.logVerbose("sendMailFromScreen sendMail context: " + serviceContext, module);
@@ -593,6 +597,9 @@ public class EmailServices {
if (UtilValidate.isNotEmpty(orderId)) {
result.put("orderId", orderId);
}
+ if (UtilValidate.isNotEmpty(custRequestId)) {
+ result.put("custRequstId", custRequestId);
+ }
return result;
}