You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2010/06/15 09:58:02 UTC
svn commit: r954737 - in /ofbiz/branches/release10.04: ./
applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Author: jleroux
Date: Tue Jun 15 07:58:02 2010
New Revision: 954737
URL: http://svn.apache.org/viewvc?rev=954737&view=rev
Log:
"Applied fix from trunk for revision: 954583"
------------------------------------------------------------------------
r954583 | jleroux | 2010-06-14 20:40:05 +0200 (lun. 14 juin 2010) | 8 lignes
Fix a bug that seems to have been introduced at r934389 for (https://issues.apache.org/jira/browse/OFBIZ-3703) - OFBIZ-3703
This fix a bug in updatePartyContactMech. When you wanted to update only the extension of a phone number it did not get stored.
I said "that seems to have been introduced" because it's working in stable demo.
I also remove a useless couple of lines at the beginning of the updatePartyContactMech service.
Finally I must say that I find very weird to have extension in PartyContactMech entity. It would be certainly more logical to have in TelecomNumber. Is it really used for anything else than phone number extension?
------------------------------------------------------------------------
Modified:
ofbiz/branches/release10.04/ (props changed)
ofbiz/branches/release10.04/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Propchange: ofbiz/branches/release10.04/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun 15 07:58:02 2010
@@ -1,3 +1,3 @@
/ofbiz/branches/addbirt:831210-885099,885686-886087
/ofbiz/branches/multitenant20100310:921280-927264
-/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004-947005,947392,947424,947679,947988,948017,948694,949174,949710,949844,950866,950870,950893,951005,951062,951098,951251,951367,951381,951672,952232,952249,952270,953294,953671,954135
+/ofbiz/trunk:939988,939990,939999,940025,940053,940234,940248,940309,940401,940410,940425,940779,940815,940849,941007,941047,941109,941177,941199,941261,941440,941600,941999,942084,942406,942414,942671,942883-942884,943168,943271-943272,944614,944621,944623,944647,944669,944797,944895,945010,945018,945026,945118,945573,945578,945580,945582,945610,945619,945848,945852,945857,946061,946066,946073,946075,946080,946309,946313,946320,946322,946596,947004-947005,947392,947424,947679,947988,948017,948694,949174,949710,949844,950866,950870,950893,951005,951062,951098,951251,951367,951381,951672,952232,952249,952270,953294,953671,954135,954583,954733
Modified: ofbiz/branches/release10.04/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=954737&r1=954736&r2=954737&view=diff
==============================================================================
--- ofbiz/branches/release10.04/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml (original)
+++ ofbiz/branches/release10.04/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml Tue Jun 15 07:58:02 2010
@@ -71,11 +71,6 @@ under the License.
</simple-method>
<simple-method method-name="updatePartyContactMech" short-description="Update a PartyContactMech">
- <make-value entity-name="PartyContactMech" value-field="newPartyContactMech"/>
- <if-empty field="parameters.partyId">
- <set field="parameters.partyId" from-field="userLogin.partyId"/>
- </if-empty>
-
<!-- Find old value -->
<make-value entity-name="PartyContactMech" value-field="partyContactMechMap"/>
<set-pk-fields value-field="partyContactMechMap" map="parameters"/>
@@ -85,11 +80,10 @@ under the License.
<if-empty field="partyContactMech">
<add-error><fail-property resource="PartyUiLabels" property="PartyCannotUpdateContactBecauseNotWithSpecifiedParty"/></add-error>
</if-empty>
-
<check-errors/>
<clone-value value-field="partyContactMech" new-value-field="newPartyContactMech"/>
-
+
<!-- If we already have a new contactMechId don't update ContactMech -->
<if-empty field="parameters.newContactMechId">
<set-service-fields service-name="updateContactMech" map="parameters" to-map="updateContactMechMap"/>
@@ -102,12 +96,11 @@ under the License.
<log level="info" message="Using supplied new contact mech id: ${newPartyContactMech.contactMechId}"/>
</else>
</if-empty>
-
- <set-nonpk-fields value-field="newPartyContactMech" map="parameters"/>
- <now-timestamp field="newPartyContactMech.fromDate"/>
- <now-timestamp field="partyContactMech.thruDate"/>
-
+
<if-compare-field to-field="newPartyContactMech.contactMechId" field="parameters.contactMechId" operator="not-equals">
+ <set-nonpk-fields value-field="newPartyContactMech" map="parameters"/>
+ <now-timestamp field="newPartyContactMech.fromDate"/>
+ <now-timestamp field="partyContactMech.thruDate"/>
<store-value value-field="partyContactMech"/>
<create-value value-field="newPartyContactMech"/>
<get-related value-field="partyContactMech" relation-name="PartyContactMechPurpose" list="partyContactMechPurposes"/>
@@ -127,11 +120,21 @@ under the License.
<create-value value-field="partyContactMechPurpose"/>
</if-empty>
</iterate>
+ <log level="info" message="Setting id to result: ${newPartyContactMech.contactMechId}"/>
+ <field-to-result field="newPartyContactMech.contactMechId" result-name="contactMechId"/>
+ <field-to-request field="newPartyContactMech.contactMechId" request-name="contactMechId"/>
+ <else>
+ <if-compare-field field="parameters.extension" operator="not-equals" to-field="partyContactMech.extension">
+ <set field="partyContactMech.extension" from-field="parameters.extension"/>
+ <set field="partyContactMech.thruDate" value=""/>
+ <store-value value-field="partyContactMech"/>
+ </if-compare-field>
+ <log level="info" message="Setting id to result: ${partyContactMech.contactMechId}"/>
+ <field-to-result field="partyContactMech.contactMechId" result-name="contactMechId"/>
+ <field-to-request field="partyContactMech.contactMechId" request-name="contactMechId"/>
+ </else>
</if-compare-field>
- <log level="info" message="Setting id to result: ${newPartyContactMech.contactMechId}"/>
- <field-to-result field="newPartyContactMech.contactMechId" result-name="contactMechId"/>
- <field-to-request field="newPartyContactMech.contactMechId" request-name="contactMechId"/>
</simple-method>
<simple-method method-name="deletePartyContactMech" short-description="Delete a PartyContactMech">