Author: jleroux
Date: Mon Oct 18 15:20:18 2010
New Revision: 1023842
URL: http://svn.apache.org/viewvc?rev=1023842&view=rev
Log:
A patch from Sascha Rodekamp "Updating Email Address say Contact Mechanism
Successfully Updated" (https://issues.apache.org/jira/browse/OFBIZ-3995) -
OFBIZ-3995
Sascha: Hm, i had a little bit trouble when i tried to update my address data
(shop). The result message was Contact Mechanism Successfully Updated. The
service (updateContactMech) tries to differ between email, phone, web ...
address changes. But the conditions are always false , because he can't read
the from the parameter fields. This patch makes the service read the parameters
in the right way.
JLR: I guess the reason we did not spot this before is because OOTB it's only
used inside ContactMechServices.xml, and there context is set. Anyway having
all in parameters is obviously better/safer, services are not supposed to be
used in one situation.
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml?rev=1023842&r1=1023841&r2=1023842&view=diff
==============================================================================
---
ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml
(original)
+++
ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ContactMechServices.xml
Mon Oct 18 15:20:18 2010
@@ -36,28 +36,28 @@ under the License.
</simple-method>
<simple-method method-name="updateContactMech" short-description="Update
Contact Mechanism">
- <if-compare field="contactMechTypeId" operator="equals"
value="POSTAL_ADDRESS">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="POSTAL_ADDRESS">
<add-error><fail-property resource="PartyUiLabels"
property="PartyServiceNotForPostalAddress"/></add-error>
</if-compare>
- <if-compare field="contactMechTypeId" operator="equals"
value="TELECOM_NUMBER">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="TELECOM_NUMBER">
<add-error><fail-property resource="PartyUiLabels"
property="PartyServiceNotForTelecomNumber"/></add-error>
</if-compare>
<check-errors/>
<set field="successMessageProperty"
value="PartyContactMechanismSuccessfullyUpdated"/>
- <if-compare field="context.contactMechTypeId" operator="equals"
value="EMAIL_ADDRESS">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="EMAIL_ADDRESS">
<set field="successMessageProperty"
value="PartyEmailAddressSuccessfullyUpdated"/>
</if-compare>
- <if-compare field="context.contactMechTypeId" operator="equals"
value="WEB_ADDRESS">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="WEB_ADDRESS">
<set field="successMessageProperty"
value="PartyWebAddressSuccessfullyUpdated"/>
</if-compare>
- <if-compare field="context.contactMechTypeId" operator="equals"
value="IP_ADDRESS">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="IP_ADDRESS">
<set field="successMessageProperty"
value="PartyIpAddressSuccessfullyUpdated"/>
</if-compare>
- <if-compare field="context.contactMechTypeId" operator="equals"
value="ELECTRONIC_ADDRESS">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="ELECTRONIC_ADDRESS">
<set field="successMessageProperty"
value="PartyElectronicAddressSuccessfullyUpdated"/>
</if-compare>
- <if-compare field="context.contactMechTypeId" operator="equals"
value="DOMAIN_NAME">
+ <if-compare field="parameters.contactMechTypeId" operator="equals"
value="DOMAIN_NAME">
<set field="successMessageProperty"
value="PartyDomainNameSuccessfullyUpdated"/>
</if-compare>