Author: jleroux
Date: Sun Nov 21 21:40:39 2010
New Revision: 1037567
URL:
http://svn.apache.org/viewvc?rev=1037567&view=revLog:
A patch from Willem Janssen "Error in service signUpForContactList" (
https://issues.apache.org/jira/browse/OFBIZ-4001) - OFBIZ-4001
The service signUpForContactList does not store the email address of the new entry to the list, instead it uses the email address of the first partyId NA to store to the list.
The service signUpForContactList calls service createContactListParty that has a check on a missing contactMechId. However this parameter is not a parameter that is used by the signUpForContactList service. So the check on the contactMechId has always the same result, it is missing!
signUpForContactList uses parameter prefferedContactMechId so I made a patch that adds the check on this parameter to createContactListParty.
Modified:
ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml
Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml?rev=1037567&r1=1037566&r2=1037567&view=diff==============================================================================
--- ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml (original)
+++ ofbiz/trunk/applications/marketing/script/org/ofbiz/marketing/contact/ContactListServices.xml Sun Nov 21 21:40:39 2010
@@ -104,12 +104,14 @@ under the License.
<check-errors/>
<!-- get party email address if not provided -->
- <if-empty field="parameters.contactMechId">
- <set field="partyEmail.partyId" from-field="parameters.partyId"/>
- <call-service service-name="getPartyEmail" in-map-name="partyEmail">
- <result-to-field result-name="contactMechId" field="parameters.preferredContactMechId"/>
- </call-service>
- </if-empty>
+ <if-empty field="parameters.preferredContactMechId">
+ <if-empty field="parameters.contactMechId">
+ <set field="partyEmail.partyId" from-field="parameters.partyId"/>
+ <call-service service-name="getPartyEmail" in-map-name="partyEmail">
+ <result-to-field result-name="contactMechId" field="parameters.preferredContactMechId"/>
+ </call-service>
+ </if-empty>
+ </if-empty>
<make-value entity-name="ContactListParty" value-field="newEntity"/>
<set-nonpk-fields map="parameters" value-field="newEntity"/>