Author: hansbak
Date: Mon Oct 27 00:47:04 2008
New Revision: 708101
URL:
http://svn.apache.org/viewvc?rev=708101&view=revLog:
reply did not copy parameters from original email
Modified:
ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy
ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml
Modified: ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy?rev=708101&r1=708100&r2=708101&view=diff==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/WEB-INF/actions/communication/PrepCommEventReply.groovy Mon Oct 27 00:47:04 2008
@@ -18,6 +18,7 @@
*/
import org.ofbiz.base.util.*;
+import org.ofbiz.party.contact.ContactMechWorker;
parentCommEventId = parameters.parentCommEventId;
@@ -30,10 +31,22 @@
parameters.origCommEventId = orgEventId;
parameters.contactMechIdTo = parentEvent.contactMechIdFrom;
+ if (!parameters.contactMechIdTo) {
+ String partyId = parentEvent.partyIdFrom;
+ contactMechList = ContactMechWorker.getPartyContactMechValueMaps(delegator, partyId, false);
+ for (int i=0;i<contactMechList.size();i++) {
+ GenericValue contactMech = (GenericValue) contactMechList.get(i).get("contactMech");
+ String contactMechTypeId = (String) contactMech.getString("contactMechTypeId");
+ if ("EMAIL_ADDRESS" == contactMechTypeId) {
+ parameters.contactMechIdTo = (String) contactMech.getString("contactMechId");
+ }
+
+ }
+ }
parameters.contactMechIdFrom = parentEvent.contactMechIdTo;
parameters.partyIdFrom = userLogin.partyId;
- parameters.partyIdTo = parentEvent.partyIdFrom;
+ parameters.partyIdTo = parentEvent.partyIdFrom;
parameters.statusId = "COM_IN_PROGRESS";
parameters.subject = "RE: " + parentEvent.subject;
Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=708101&r1=708100&r2=708101&view=diff==============================================================================
--- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original)
+++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Mon Oct 27 00:47:04 2008
@@ -268,7 +268,7 @@
</drop-down>
</field>
<field name="contactMechIdTo" title="${uiLabelMap.PartyEmailTo}">
- <lookup target-form-name="LookupPartyEmail"/>
+ <lookup target-form-name="LookupPartyEmail" default-value="${parameters.contactMechIdTo}"/>
</field>
<field name="datetimeStarted" title="${uiLabelMap.CommonSendDate}"><date-time/></field>
<field name="subject"><text size="60" default-value="${parameters.subject}"/></field>