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 2009/10/07 01:29:09 UTC
svn commit: r822537 -
/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Author: jleroux
Date: Tue Oct 6 23:29:09 2009
New Revision: 822537
URL: http://svn.apache.org/viewvc?rev=822537&view=rev
Log:
Fix a false log info
Modified:
ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=822537&r1=822536&r2=822537&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml (original)
+++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml Tue Oct 6 23:29:09 2009
@@ -56,11 +56,12 @@
<result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
</call-service>
<log level="info" message="ContactMech created"/>
+ <log level="info" message="Creating a PartyContactMech with id: ${newValue.contactMechId}"/>
<else>
<set field="newValue.contactMechId" from-field="parameters.contactMechId"/>
+ <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/>
</else>
</if-empty>
- <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/>
<set field="newValue.partyId" from-field="parameters.partyId"/>
<field-to-result field="newValue.contactMechId" result-name="contactMechId"/>
<field-to-request field="newValue.contactMechId" request-name="contactMechId"/>
@@ -301,21 +302,21 @@
</if-empty>
<set field="input.inputFields.infoString_ic" from-field="parameters.caseInsensitive"/>
<log level="info" message="findPartyFromEmailAddress with case insensitive search: ${parameters.caseInsensitive}"/>
-
+
<if-empty field="parameters.fromDate">
<set field="input.filterByDate" value="Y"/>
<else>
<set field="input.filterByDateValue" from-field="parameters.fromDate"/>
</else>
</if-empty>
-
+
<!-- try primary email address -->
<set field="input.inputFields.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
<set field="input.entityName" value="PartyContactDetailByPurpose"/>
<call-service service-name="performFindItem" in-map-name="input">
<results-to-map map-name="results"/>
</call-service>
-
+
<!-- any other email address -->
<if-empty field="results.item">
<set field="input.entityName" value="PartyAndContactMech"/>
@@ -323,15 +324,15 @@
<call-service service-name="performFindItem" in-map-name="input">
<results-to-map map-name="results"/>
</call-service>
- </if-empty>
-
+ </if-empty>
+
<if-not-empty field="results.item">
<field-to-result field="results.item.partyId" result-name="partyId"/>
<field-to-result field="results.item.contactMechId" result-name="contactMechId"/>
</if-not-empty>
-
+
</simple-method>
-
+
<simple-method method-name="findPartyFromTelephone" short-description="Find partyId from the telephone number">
<entity-and entity-name="PartyAndContactMech" list="contactMechs" filter-by-date="true">
@@ -340,9 +341,46 @@
<set field="dash" value="-"/>
<set field="emptyString" value=""/>
- <set field="inputTelno" value="${str:replaceAll(parameters.telno, dash, emptyString)}"/>
+ <!--set field="inputTelno" value="${str:replaceAll(parameters.telno, dash, emptyString)}"/-->
+ <log level="always" message="parameters.telno====================${parameters.telno}"></log>
+ <log level="always" message="inputTelno====================${inputTelno}"></log>
+ <iterate entry="contactMech" list="contactMechs">
+ <set field="telno" from-field="contactMech.tnContactNumber"/>
+ <!--set field="telno" value="${str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
+ <if-compare-field field="inputTelno" operator="equals" to-field="telno">
+ <set field="partyId" from-field="contactMech.partyId"/>
+ </if-compare-field>
+ <set field="telno" value="${contactMech.tnAreaCode}${telno}"/>
+ <if-compare-field field="inputTelno" operator="equals" to-field="telno">
+ <set field="partyId" from-field="contactMech.partyId"/>
+ </if-compare-field>
+ <set field="telno" value="${contactMech.tnCountryCode}${telno}"/>
+ <if-compare-field field="inputTelno" operator="equals" to-field="telno">
+ <set field="partyId" from-field="contactMech.partyId"/>
+ </if-compare-field>
+ <set field="telno" value="+${telno}"/>
+ <if-compare-field field="inputTelno" operator="equals" to-field="telno">
+ <set field="partyId" from-field="contactMech.partyId"/>
+ </if-compare-field>
+ </iterate>
+ <if-not-empty field="partyId">
+ <field-to-result field="partyId"/>
+ <field-to-result field="contactMech.contactMechId" result-name="contactMechId"/>
+ </if-not-empty>
+ </simple-method>
+
+ <simple-method method-name="findPartyFromTelephoneComplete" short-description="Find partyId from the telephone number">
+
+ <entity-and entity-name="PartyAndContactMech" list="contactMechs" filter-by-date="true">
+ <field-map field-name="contactMechTypeId" value="TELECOM_NUMBER"/>
+ </entity-and>
+
+ <set field="dash" value="-"/>
+ <set field="emptyString" value=""/>
+ <set field="inputTelno" from-field="parameters.telno"/>
<iterate entry="contactMech" list="contactMechs">
- <set field="telno" value="${str:replace(contactMech.tnContactNumber, dash, emptyString)}"/>
+ <set field="telno" from-field="contactMech.tnContactNumber"/>
+ <!--set field="telno" value="${str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
<if-compare-field field="inputTelno" operator="equals" to-field="telno">
<set field="partyId" from-field="contactMech.partyId"/>
</if-compare-field>
@@ -364,7 +402,7 @@
<field-to-result field="contactMech.contactMechId" result-name="contactMechId"/>
</if-not-empty>
</simple-method>
-
+
<simple-method method-name="createPostalAddressAndPurposes" short-description="Create postal address, purposes and set them defaults" login-required="false">
<call-service service-name="createPartyPostalAddress" in-map-name="parameters">
<result-to-field result-name="contactMechId" field="parameters.contactMechId"/>
@@ -552,7 +590,7 @@
</call-service>
</if-not-empty>
</simple-method>
-
+
<simple-method method-name="createUpdatePartyEmailAddress" short-description="Create and update email address" login-required="false">
<if-empty field="parameters.contactMechId">
<set-service-fields service-name="createPartyEmailAddress" map="parameters" to-map="emailAddressContext"/>
@@ -573,7 +611,7 @@
<field-to-result field="contactMech.infoString" result-name="emailAddress"/>
<field-to-result field="contactMechId"/>
</simple-method>
-
+
<simple-method method-name="createUpdatePartyTelecomNumber" short-description="Create and update phone number" login-required="false">
<if-empty field="parameters.contactMechId">
<set-service-fields service-name="createPartyTelecomNumber" map="parameters" to-map="phoneContext"/>
@@ -591,4 +629,4 @@
</if-empty>
<field-to-result field="contactMechId"/>
</simple-method>
-</simple-methods>
\ No newline at end of file
+</simple-methods>
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Tim Ruppert <ti...@hotwaxmedia.com>.
I don't know from git - but the idea of history rewriting is always
interesting :)
Cheers,
Ruppert
--
Tim Ruppert
HotWax Media
http://www.hotwaxmedia.com
o:801.649.6594
f:801.649.6595
On Oct 7, 2009, at 3:18 PM, Adam Heath wrote:
> Scott Gray wrote:
>> Is there a service definition to go with it? Also I really suggest
>> that
>> you stop working on an instance that has multiple patches applied,
>> this
>> is isn't the first time you've accidentally committed code and if you
>> carry on I guarantee it won't be the last. One thing I often do is
>> check out my working copy in http so that I can't commit from it
>> which
>> forces me to patch and review my clean https checkout before
>> committing.
>
> git, with history rewriting.
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Adam Heath <do...@brainfood.com>.
Scott Gray wrote:
> Is there a service definition to go with it? Also I really suggest that
> you stop working on an instance that has multiple patches applied, this
> is isn't the first time you've accidentally committed code and if you
> carry on I guarantee it won't be the last. One thing I often do is
> check out my working copy in http so that I can't commit from it which
> forces me to patch and review my clean https checkout before committing.
git, with history rewriting.
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Thanks Jacques, much appreciated.
Regards
Scott
On 7/10/2009, at 7:19 PM, Jacques Le Roux wrote:
> OK, the service definition is commited at r822599
>
> Yes I agree about your http idea, I will do, but later, really in a
> hurry for now... In the meantime I will not do stupid commits like
> this :/
>
> Thanks and sorry for the noise
>
> Jacques
>
> From: "Scott Gray" <sc...@hotwaxmedia.com>
>> Is there a service definition to go with it? Also I really
>> suggest that you stop working on an instance that has multiple
>> patches applied, this is isn't the first time you've accidentally
>> committed code and if you carry on I guarantee it won't be the
>> last. One thing I often do is check out my working copy in http
>> so that I can't commit from it which forces me to patch and review
>> my clean https checkout before committing.
>>
>> Regards
>> Scott
>>
>> On 7/10/2009, at 1:29 PM, Jacques Le Roux wrote:
>>
>>> Ha no sorry,
>>>
>>> I had also added findPartyFromTelephoneComplete some days ago and
>>> forgot about it. The others lines are simply superfluous white
>>> spaces suppressed.
>>> It was not supposed to be commited right now. But as it's useful,
>>> I have simply restored findPartyFromTelephone and cleaned the
>>> log lines of findPartyFromTelephoneComplete in r822540
>>>
>>> Thanks (I'm a bit tired...)
>>>
>>> Jacques
>>>
>>> From: "Scott Gray" <sc...@hotwaxmedia.com>
>>>> Is it just me or was this commit much more than just "Fix a
>>>> false log info"?
>>>>
>>>> Thanks
>>>> Scott
>>>>
>>>> HotWax Media
>>>> http://www.hotwaxmedia.com
>>>>
>>>> On 7/10/2009, at 12:29 PM, jleroux@apache.org wrote:
>>>>
>>>>> Author: jleroux
>>>>> Date: Tue Oct 6 23:29:09 2009
>>>>> New Revision: 822537
>>>>>
>>>>> URL: http://svn.apache.org/viewvc?rev=822537&view=rev
>>>>> Log:
>>>>> Fix a false log info
>>>>>
>>>>> Modified:
>>>>> ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
>>>>> PartyContactMechServices.xml
>>>>>
>>>>> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/
>>>>> party/ contact/PartyContactMechServices.xml
>>>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=822537&r1=822536&r2=822537&view=diff
>>>>> = = = = = = = = = =
>>>>> =
>>>>> =
>>>>> ==================================================================
>>>>> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/
>>>>> contact/ PartyContactMechServices.xml (original)
>>>>> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/
>>>>> contact/ PartyContactMechServices.xml Tue Oct 6 23:29:09 2009
>>>>> @@ -56,11 +56,12 @@
>>>>> <result-to-field result-name="contactMechId"
>>>>> field="newValue.contactMechId"/>
>>>>> </call-service>
>>>>> <log level="info" message="ContactMech created"/>
>>>>> + <log level="info" message="Creating a
>>>>> PartyContactMech with id: ${newValue.contactMechId}"/>
>>>>> <else>
>>>>> <set field="newValue.contactMechId" from-
>>>>> field="parameters.contactMechId"/>
>>>>> + <log level="info" message="Creating a
>>>>> PartyContactMech with id: ${parameters.contactMechId}"/>
>>>>> </else>
>>>>> </if-empty>
>>>>> - <log level="info" message="Creating a PartyContactMech
>>>>> with id: ${parameters.contactMechId}"/>
>>>>> <set field="newValue.partyId" from-
>>>>> field="parameters.partyId"/>
>>>>> <field-to-result field="newValue.contactMechId" result-
>>>>> name="contactMechId"/>
>>>>> <field-to-request field="newValue.contactMechId" request-
>>>>> name="contactMechId"/>
>>>>> @@ -301,21 +302,21 @@
>>>>> </if-empty>
>>>>> <set field="input.inputFields.infoString_ic" from-
>>>>> field="parameters.caseInsensitive"/>
>>>>> <log level="info" message="findPartyFromEmailAddress
>>>>> with case insensitive search: ${parameters.caseInsensitive}"/>
>>>>> -
>>>>> +
>>>>> <if-empty field="parameters.fromDate">
>>>>> <set field="input.filterByDate" value="Y"/>
>>>>> <else>
>>>>> <set field="input.filterByDateValue" from-
>>>>> field="parameters.fromDate"/>
>>>>> </else>
>>>>> </if-empty>
>>>>> -
>>>>> +
>>>>> <!-- try primary email address -->
>>>>> <set field="input.inputFields.contactMechPurposeTypeId"
>>>>> value="PRIMARY_EMAIL"/>
>>>>> <set field="input.entityName"
>>>>> value="PartyContactDetailByPurpose"/>
>>>>> <call-service service-name="performFindItem" in-map-
>>>>> name="input">
>>>>> <results-to-map map-name="results"/>
>>>>> </call-service>
>>>>> -
>>>>> +
>>>>> <!-- any other email address -->
>>>>> <if-empty field="results.item">
>>>>> <set field="input.entityName"
>>>>> value="PartyAndContactMech"/>
>>>>> @@ -323,15 +324,15 @@
>>>>> <call-service service-name="performFindItem" in-map-
>>>>> name="input">
>>>>> <results-to-map map-name="results"/>
>>>>> </call-service>
>>>>> - </if-empty>
>>>>> -
>>>>> + </if-empty>
>>>>> +
>>>>> <if-not-empty field="results.item">
>>>>> <field-to-result field="results.item.partyId" result-
>>>>> name="partyId"/>
>>>>> <field-to-result field="results.item.contactMechId"
>>>>> result-name="contactMechId"/>
>>>>> </if-not-empty>
>>>>> -
>>>>> +
>>>>> </simple-method>
>>>>> -
>>>>> +
>>>>> <simple-method method-name="findPartyFromTelephone" short-
>>>>> description="Find partyId from the telephone number">
>>>>>
>>>>> <entity-and entity-name="PartyAndContactMech"
>>>>> list="contactMechs" filter-by-date="true">
>>>>> @@ -340,9 +341,46 @@
>>>>>
>>>>> <set field="dash" value="-"/>
>>>>> <set field="emptyString" value=""/>
>>>>> - <set field="inputTelno" value="$
>>>>> {str:replaceAll(parameters.telno, dash, emptyString)}"/>
>>>>> + <!--set field="inputTelno" value="$
>>>>> {str:replaceAll(parameters.telno, dash, emptyString)}"/-->
>>>>> + <log level="always"
>>>>> message="parameters.telno====================$
>>>>> {parameters.telno}"></ log>
>>>>> + <log level="always"
>>>>> message="inputTelno====================$ {inputTelno}"></log>
>>>>> + <iterate entry="contactMech" list="contactMechs">
>>>>> + <set field="telno" from-
>>>>> field="contactMech.tnContactNumber"/>
>>>>> + <!--set field="telno" value="$
>>>>> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>>>>> + <if-compare-field field="inputTelno"
>>>>> operator="equals" to-field="telno">
>>>>> + <set field="partyId" from-
>>>>> field="contactMech.partyId"/>
>>>>> + </if-compare-field>
>>>>> + <set field="telno" value="${contactMech.tnAreaCode}
>>>>> $ {telno}"/>
>>>>> + <if-compare-field field="inputTelno"
>>>>> operator="equals" to-field="telno">
>>>>> + <set field="partyId" from-
>>>>> field="contactMech.partyId"/>
>>>>> + </if-compare-field>
>>>>> + <set field="telno" value="$
>>>>> {contactMech.tnCountryCode} $ {telno}"/>
>>>>> + <if-compare-field field="inputTelno"
>>>>> operator="equals" to-field="telno">
>>>>> + <set field="partyId" from-
>>>>> field="contactMech.partyId"/>
>>>>> + </if-compare-field>
>>>>> + <set field="telno" value="+${telno}"/>
>>>>> + <if-compare-field field="inputTelno"
>>>>> operator="equals" to-field="telno">
>>>>> + <set field="partyId" from-
>>>>> field="contactMech.partyId"/>
>>>>> + </if-compare-field>
>>>>> + </iterate>
>>>>> + <if-not-empty field="partyId">
>>>>> + <field-to-result field="partyId"/>
>>>>> + <field-to-result
>>>>> field="contactMech.contactMechId" result-name="contactMechId"/>
>>>>> + </if-not-empty>
>>>>> + </simple-method>
>>>>> +
>>>>> + <simple-method method-
>>>>> name="findPartyFromTelephoneComplete" short-description="Find
>>>>> partyId from the telephone number">
>>>>> +
>>>>> + <entity-and entity-name="PartyAndContactMech"
>>>>> list="contactMechs" filter-by-date="true">
>>>>> + <field-map field-name="contactMechTypeId"
>>>>> value="TELECOM_NUMBER"/>
>>>>> + </entity-and>
>>>>> +
>>>>> + <set field="dash" value="-"/>
>>>>> + <set field="emptyString" value=""/>
>>>>> + <set field="inputTelno" from-field="parameters.telno"/>
>>>>> <iterate entry="contactMech" list="contactMechs">
>>>>> - <set field="telno" value="$
>>>>> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/>
>>>>> + <set field="telno" from-
>>>>> field="contactMech.tnContactNumber"/>
>>>>> + <!--set field="telno" value="$
>>>>> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>>>>> <if-compare-field field="inputTelno"
>>>>> operator="equals" to-field="telno">
>>>>> <set field="partyId" from-
>>>>> field="contactMech.partyId"/>
>>>>> </if-compare-field>
>>>>> @@ -364,7 +402,7 @@
>>>>> <field-to-result field="contactMech.contactMechId"
>>>>> result-name="contactMechId"/>
>>>>> </if-not-empty>
>>>>> </simple-method>
>>>>> -
>>>>> +
>>>>> <simple-method method-name="createPostalAddressAndPurposes"
>>>>> short-description="Create postal address, purposes and set them
>>>>> defaults" login-required="false">
>>>>> <call-service service-name="createPartyPostalAddress" in-
>>>>> map- name="parameters">
>>>>> <result-to-field result-name="contactMechId"
>>>>> field="parameters.contactMechId"/>
>>>>> @@ -552,7 +590,7 @@
>>>>> </call-service>
>>>>> </if-not-empty>
>>>>> </simple-method>
>>>>> -
>>>>> +
>>>>> <simple-method method-name="createUpdatePartyEmailAddress"
>>>>> short- description="Create and update email address" login-
>>>>> required="false">
>>>>> <if-empty field="parameters.contactMechId">
>>>>> <set-service-fields service-
>>>>> name="createPartyEmailAddress" map="parameters" to-
>>>>> map="emailAddressContext"/>
>>>>> @@ -573,7 +611,7 @@
>>>>> <field-to-result field="contactMech.infoString" result-
>>>>> name="emailAddress"/>
>>>>> <field-to-result field="contactMechId"/>
>>>>> </simple-method>
>>>>> -
>>>>> +
>>>>> <simple-method method-name="createUpdatePartyTelecomNumber"
>>>>> short-description="Create and update phone number" login-
>>>>> required="false">
>>>>> <if-empty field="parameters.contactMechId">
>>>>> <set-service-fields service-
>>>>> name="createPartyTelecomNumber" map="parameters" to-
>>>>> map="phoneContext"/>
>>>>> @@ -591,4 +629,4 @@
>>>>> </if-empty>
>>>>> <field-to-result field="contactMechId"/>
>>>>> </simple-method>
>>>>> -</simple-methods>
>>>>> \ No newline at end of file
>>>>> +</simple-methods>
>>>>>
>>>>>
>>>>
>>>
>>>
>>
>
>
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Jacques Le Roux <ja...@les7arts.com>.
OK, the service definition is commited at r822599
Yes I agree about your http idea, I will do, but later, really in a hurry for now... In the meantime I will not do stupid commits
like this :/
Thanks and sorry for the noise
Jacques
From: "Scott Gray" <sc...@hotwaxmedia.com>
> Is there a service definition to go with it? Also I really suggest that you stop working on an instance that has multiple
> patches applied, this is isn't the first time you've accidentally committed code and if you carry on I guarantee it won't be the
> last. One thing I often do is check out my working copy in http so that I can't commit from it which forces me to patch and
> review my clean https checkout before committing.
>
> Regards
> Scott
>
> On 7/10/2009, at 1:29 PM, Jacques Le Roux wrote:
>
>> Ha no sorry,
>>
>> I had also added findPartyFromTelephoneComplete some days ago and forgot about it. The others lines are simply superfluous white
>> spaces suppressed.
>> It was not supposed to be commited right now. But as it's useful, I have simply restored findPartyFromTelephone and cleaned the
>> log lines of findPartyFromTelephoneComplete in r822540
>>
>> Thanks (I'm a bit tired...)
>>
>> Jacques
>>
>> From: "Scott Gray" <sc...@hotwaxmedia.com>
>>> Is it just me or was this commit much more than just "Fix a false log info"?
>>>
>>> Thanks
>>> Scott
>>>
>>> HotWax Media
>>> http://www.hotwaxmedia.com
>>>
>>> On 7/10/2009, at 12:29 PM, jleroux@apache.org wrote:
>>>
>>>> Author: jleroux
>>>> Date: Tue Oct 6 23:29:09 2009
>>>> New Revision: 822537
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=822537&view=rev
>>>> Log:
>>>> Fix a false log info
>>>>
>>>> Modified:
>>>> ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml
>>>>
>>>> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/ contact/PartyContactMechServices.xml
>>>> URL:
>>>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=822537&r1=822536&r2=822537&view=diff
>>>> = = = = = = = = = = ====================================================================
>>>> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml (original)
>>>> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml Tue Oct 6 23:29:09 2009
>>>> @@ -56,11 +56,12 @@
>>>> <result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
>>>> </call-service>
>>>> <log level="info" message="ContactMech created"/>
>>>> + <log level="info" message="Creating a PartyContactMech with id: ${newValue.contactMechId}"/>
>>>> <else>
>>>> <set field="newValue.contactMechId" from- field="parameters.contactMechId"/>
>>>> + <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/>
>>>> </else>
>>>> </if-empty>
>>>> - <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/>
>>>> <set field="newValue.partyId" from- field="parameters.partyId"/>
>>>> <field-to-result field="newValue.contactMechId" result- name="contactMechId"/>
>>>> <field-to-request field="newValue.contactMechId" request- name="contactMechId"/>
>>>> @@ -301,21 +302,21 @@
>>>> </if-empty>
>>>> <set field="input.inputFields.infoString_ic" from- field="parameters.caseInsensitive"/>
>>>> <log level="info" message="findPartyFromEmailAddress with case insensitive search: ${parameters.caseInsensitive}"/>
>>>> -
>>>> +
>>>> <if-empty field="parameters.fromDate">
>>>> <set field="input.filterByDate" value="Y"/>
>>>> <else>
>>>> <set field="input.filterByDateValue" from- field="parameters.fromDate"/>
>>>> </else>
>>>> </if-empty>
>>>> -
>>>> +
>>>> <!-- try primary email address -->
>>>> <set field="input.inputFields.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
>>>> <set field="input.entityName" value="PartyContactDetailByPurpose"/>
>>>> <call-service service-name="performFindItem" in-map- name="input">
>>>> <results-to-map map-name="results"/>
>>>> </call-service>
>>>> -
>>>> +
>>>> <!-- any other email address -->
>>>> <if-empty field="results.item">
>>>> <set field="input.entityName" value="PartyAndContactMech"/>
>>>> @@ -323,15 +324,15 @@
>>>> <call-service service-name="performFindItem" in-map- name="input">
>>>> <results-to-map map-name="results"/>
>>>> </call-service>
>>>> - </if-empty>
>>>> -
>>>> + </if-empty>
>>>> +
>>>> <if-not-empty field="results.item">
>>>> <field-to-result field="results.item.partyId" result- name="partyId"/>
>>>> <field-to-result field="results.item.contactMechId" result-name="contactMechId"/>
>>>> </if-not-empty>
>>>> -
>>>> +
>>>> </simple-method>
>>>> -
>>>> +
>>>> <simple-method method-name="findPartyFromTelephone" short- description="Find partyId from the telephone number">
>>>>
>>>> <entity-and entity-name="PartyAndContactMech" list="contactMechs" filter-by-date="true">
>>>> @@ -340,9 +341,46 @@
>>>>
>>>> <set field="dash" value="-"/>
>>>> <set field="emptyString" value=""/>
>>>> - <set field="inputTelno" value="$ {str:replaceAll(parameters.telno, dash, emptyString)}"/>
>>>> + <!--set field="inputTelno" value="$ {str:replaceAll(parameters.telno, dash, emptyString)}"/-->
>>>> + <log level="always" message="parameters.telno====================$ {parameters.telno}"></ log>
>>>> + <log level="always" message="inputTelno====================$ {inputTelno}"></log>
>>>> + <iterate entry="contactMech" list="contactMechs">
>>>> + <set field="telno" from- field="contactMech.tnContactNumber"/>
>>>> + <!--set field="telno" value="$ {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>>>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>>>> + <set field="partyId" from- field="contactMech.partyId"/>
>>>> + </if-compare-field>
>>>> + <set field="telno" value="${contactMech.tnAreaCode}$ {telno}"/>
>>>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>>>> + <set field="partyId" from- field="contactMech.partyId"/>
>>>> + </if-compare-field>
>>>> + <set field="telno" value="${contactMech.tnCountryCode} $ {telno}"/>
>>>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>>>> + <set field="partyId" from- field="contactMech.partyId"/>
>>>> + </if-compare-field>
>>>> + <set field="telno" value="+${telno}"/>
>>>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>>>> + <set field="partyId" from- field="contactMech.partyId"/>
>>>> + </if-compare-field>
>>>> + </iterate>
>>>> + <if-not-empty field="partyId">
>>>> + <field-to-result field="partyId"/>
>>>> + <field-to-result field="contactMech.contactMechId" result-name="contactMechId"/>
>>>> + </if-not-empty>
>>>> + </simple-method>
>>>> +
>>>> + <simple-method method-name="findPartyFromTelephoneComplete" short-description="Find partyId from the telephone number">
>>>> +
>>>> + <entity-and entity-name="PartyAndContactMech" list="contactMechs" filter-by-date="true">
>>>> + <field-map field-name="contactMechTypeId" value="TELECOM_NUMBER"/>
>>>> + </entity-and>
>>>> +
>>>> + <set field="dash" value="-"/>
>>>> + <set field="emptyString" value=""/>
>>>> + <set field="inputTelno" from-field="parameters.telno"/>
>>>> <iterate entry="contactMech" list="contactMechs">
>>>> - <set field="telno" value="$ {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/>
>>>> + <set field="telno" from- field="contactMech.tnContactNumber"/>
>>>> + <!--set field="telno" value="$ {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>>>> <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>>>> <set field="partyId" from- field="contactMech.partyId"/>
>>>> </if-compare-field>
>>>> @@ -364,7 +402,7 @@
>>>> <field-to-result field="contactMech.contactMechId" result-name="contactMechId"/>
>>>> </if-not-empty>
>>>> </simple-method>
>>>> -
>>>> +
>>>> <simple-method method-name="createPostalAddressAndPurposes" short-description="Create postal address, purposes and set
>>>> them defaults" login-required="false">
>>>> <call-service service-name="createPartyPostalAddress" in- map- name="parameters">
>>>> <result-to-field result-name="contactMechId" field="parameters.contactMechId"/>
>>>> @@ -552,7 +590,7 @@
>>>> </call-service>
>>>> </if-not-empty>
>>>> </simple-method>
>>>> -
>>>> +
>>>> <simple-method method-name="createUpdatePartyEmailAddress" short- description="Create and update email address" login-
>>>> required="false">
>>>> <if-empty field="parameters.contactMechId">
>>>> <set-service-fields service- name="createPartyEmailAddress" map="parameters" to- map="emailAddressContext"/>
>>>> @@ -573,7 +611,7 @@
>>>> <field-to-result field="contactMech.infoString" result- name="emailAddress"/>
>>>> <field-to-result field="contactMechId"/>
>>>> </simple-method>
>>>> -
>>>> +
>>>> <simple-method method-name="createUpdatePartyTelecomNumber" short-description="Create and update phone number" login-
>>>> required="false">
>>>> <if-empty field="parameters.contactMechId">
>>>> <set-service-fields service- name="createPartyTelecomNumber" map="parameters" to- map="phoneContext"/>
>>>> @@ -591,4 +629,4 @@
>>>> </if-empty>
>>>> <field-to-result field="contactMechId"/>
>>>> </simple-method>
>>>> -</simple-methods>
>>>> \ No newline at end of file
>>>> +</simple-methods>
>>>>
>>>>
>>>
>>
>>
>
>
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Is there a service definition to go with it? Also I really suggest
that you stop working on an instance that has multiple patches
applied, this is isn't the first time you've accidentally committed
code and if you carry on I guarantee it won't be the last. One thing
I often do is check out my working copy in http so that I can't commit
from it which forces me to patch and review my clean https checkout
before committing.
Regards
Scott
On 7/10/2009, at 1:29 PM, Jacques Le Roux wrote:
> Ha no sorry,
>
> I had also added findPartyFromTelephoneComplete some days ago and
> forgot about it. The others lines are simply superfluous white
> spaces suppressed.
> It was not supposed to be commited right now. But as it's useful, I
> have simply restored findPartyFromTelephone and cleaned the log
> lines of findPartyFromTelephoneComplete in r822540
>
> Thanks (I'm a bit tired...)
>
> Jacques
>
> From: "Scott Gray" <sc...@hotwaxmedia.com>
>> Is it just me or was this commit much more than just "Fix a false
>> log info"?
>>
>> Thanks
>> Scott
>>
>> HotWax Media
>> http://www.hotwaxmedia.com
>>
>> On 7/10/2009, at 12:29 PM, jleroux@apache.org wrote:
>>
>>> Author: jleroux
>>> Date: Tue Oct 6 23:29:09 2009
>>> New Revision: 822537
>>>
>>> URL: http://svn.apache.org/viewvc?rev=822537&view=rev
>>> Log:
>>> Fix a false log info
>>>
>>> Modified:
>>> ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
>>> PartyContactMechServices.xml
>>>
>>> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/
>>> contact/PartyContactMechServices.xml
>>> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=822537&r1=822536&r2=822537&view=diff
>>> = = = = = = = =
>>> =
>>> =
>>> ====================================================================
>>> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
>>> PartyContactMechServices.xml (original)
>>> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
>>> PartyContactMechServices.xml Tue Oct 6 23:29:09 2009
>>> @@ -56,11 +56,12 @@
>>> <result-to-field result-name="contactMechId"
>>> field="newValue.contactMechId"/>
>>> </call-service>
>>> <log level="info" message="ContactMech created"/>
>>> + <log level="info" message="Creating a
>>> PartyContactMech with id: ${newValue.contactMechId}"/>
>>> <else>
>>> <set field="newValue.contactMechId" from-
>>> field="parameters.contactMechId"/>
>>> + <log level="info" message="Creating a
>>> PartyContactMech with id: ${parameters.contactMechId}"/>
>>> </else>
>>> </if-empty>
>>> - <log level="info" message="Creating a PartyContactMech
>>> with id: ${parameters.contactMechId}"/>
>>> <set field="newValue.partyId" from-
>>> field="parameters.partyId"/>
>>> <field-to-result field="newValue.contactMechId" result-
>>> name="contactMechId"/>
>>> <field-to-request field="newValue.contactMechId" request-
>>> name="contactMechId"/>
>>> @@ -301,21 +302,21 @@
>>> </if-empty>
>>> <set field="input.inputFields.infoString_ic" from-
>>> field="parameters.caseInsensitive"/>
>>> <log level="info" message="findPartyFromEmailAddress with
>>> case insensitive search: ${parameters.caseInsensitive}"/>
>>> -
>>> +
>>> <if-empty field="parameters.fromDate">
>>> <set field="input.filterByDate" value="Y"/>
>>> <else>
>>> <set field="input.filterByDateValue" from-
>>> field="parameters.fromDate"/>
>>> </else>
>>> </if-empty>
>>> -
>>> +
>>> <!-- try primary email address -->
>>> <set field="input.inputFields.contactMechPurposeTypeId"
>>> value="PRIMARY_EMAIL"/>
>>> <set field="input.entityName"
>>> value="PartyContactDetailByPurpose"/>
>>> <call-service service-name="performFindItem" in-map-
>>> name="input">
>>> <results-to-map map-name="results"/>
>>> </call-service>
>>> -
>>> +
>>> <!-- any other email address -->
>>> <if-empty field="results.item">
>>> <set field="input.entityName"
>>> value="PartyAndContactMech"/>
>>> @@ -323,15 +324,15 @@
>>> <call-service service-name="performFindItem" in-map-
>>> name="input">
>>> <results-to-map map-name="results"/>
>>> </call-service>
>>> - </if-empty>
>>> -
>>> + </if-empty>
>>> +
>>> <if-not-empty field="results.item">
>>> <field-to-result field="results.item.partyId" result-
>>> name="partyId"/>
>>> <field-to-result field="results.item.contactMechId"
>>> result-name="contactMechId"/>
>>> </if-not-empty>
>>> -
>>> +
>>> </simple-method>
>>> -
>>> +
>>> <simple-method method-name="findPartyFromTelephone" short-
>>> description="Find partyId from the telephone number">
>>>
>>> <entity-and entity-name="PartyAndContactMech"
>>> list="contactMechs" filter-by-date="true">
>>> @@ -340,9 +341,46 @@
>>>
>>> <set field="dash" value="-"/>
>>> <set field="emptyString" value=""/>
>>> - <set field="inputTelno" value="$
>>> {str:replaceAll(parameters.telno, dash, emptyString)}"/>
>>> + <!--set field="inputTelno" value="$
>>> {str:replaceAll(parameters.telno, dash, emptyString)}"/-->
>>> + <log level="always"
>>> message="parameters.telno====================$
>>> {parameters.telno}"></ log>
>>> + <log level="always"
>>> message="inputTelno====================$ {inputTelno}"></log>
>>> + <iterate entry="contactMech" list="contactMechs">
>>> + <set field="telno" from-
>>> field="contactMech.tnContactNumber"/>
>>> + <!--set field="telno" value="$
>>> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>>> + <if-compare-field field="inputTelno"
>>> operator="equals" to-field="telno">
>>> + <set field="partyId" from-
>>> field="contactMech.partyId"/>
>>> + </if-compare-field>
>>> + <set field="telno" value="${contactMech.tnAreaCode}$
>>> {telno}"/>
>>> + <if-compare-field field="inputTelno"
>>> operator="equals" to-field="telno">
>>> + <set field="partyId" from-
>>> field="contactMech.partyId"/>
>>> + </if-compare-field>
>>> + <set field="telno" value="${contactMech.tnCountryCode}
>>> $ {telno}"/>
>>> + <if-compare-field field="inputTelno"
>>> operator="equals" to-field="telno">
>>> + <set field="partyId" from-
>>> field="contactMech.partyId"/>
>>> + </if-compare-field>
>>> + <set field="telno" value="+${telno}"/>
>>> + <if-compare-field field="inputTelno"
>>> operator="equals" to-field="telno">
>>> + <set field="partyId" from-
>>> field="contactMech.partyId"/>
>>> + </if-compare-field>
>>> + </iterate>
>>> + <if-not-empty field="partyId">
>>> + <field-to-result field="partyId"/>
>>> + <field-to-result field="contactMech.contactMechId"
>>> result-name="contactMechId"/>
>>> + </if-not-empty>
>>> + </simple-method>
>>> +
>>> + <simple-method method-name="findPartyFromTelephoneComplete"
>>> short-description="Find partyId from the telephone number">
>>> +
>>> + <entity-and entity-name="PartyAndContactMech"
>>> list="contactMechs" filter-by-date="true">
>>> + <field-map field-name="contactMechTypeId"
>>> value="TELECOM_NUMBER"/>
>>> + </entity-and>
>>> +
>>> + <set field="dash" value="-"/>
>>> + <set field="emptyString" value=""/>
>>> + <set field="inputTelno" from-field="parameters.telno"/>
>>> <iterate entry="contactMech" list="contactMechs">
>>> - <set field="telno" value="$
>>> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/>
>>> + <set field="telno" from-
>>> field="contactMech.tnContactNumber"/>
>>> + <!--set field="telno" value="$
>>> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>>> <if-compare-field field="inputTelno" operator="equals"
>>> to-field="telno">
>>> <set field="partyId" from-
>>> field="contactMech.partyId"/>
>>> </if-compare-field>
>>> @@ -364,7 +402,7 @@
>>> <field-to-result field="contactMech.contactMechId"
>>> result-name="contactMechId"/>
>>> </if-not-empty>
>>> </simple-method>
>>> -
>>> +
>>> <simple-method method-name="createPostalAddressAndPurposes"
>>> short-description="Create postal address, purposes and set them
>>> defaults" login-required="false">
>>> <call-service service-name="createPartyPostalAddress" in-
>>> map- name="parameters">
>>> <result-to-field result-name="contactMechId"
>>> field="parameters.contactMechId"/>
>>> @@ -552,7 +590,7 @@
>>> </call-service>
>>> </if-not-empty>
>>> </simple-method>
>>> -
>>> +
>>> <simple-method method-name="createUpdatePartyEmailAddress"
>>> short- description="Create and update email address" login-
>>> required="false">
>>> <if-empty field="parameters.contactMechId">
>>> <set-service-fields service-
>>> name="createPartyEmailAddress" map="parameters" to-
>>> map="emailAddressContext"/>
>>> @@ -573,7 +611,7 @@
>>> <field-to-result field="contactMech.infoString" result-
>>> name="emailAddress"/>
>>> <field-to-result field="contactMechId"/>
>>> </simple-method>
>>> -
>>> +
>>> <simple-method method-name="createUpdatePartyTelecomNumber"
>>> short-description="Create and update phone number" login-
>>> required="false">
>>> <if-empty field="parameters.contactMechId">
>>> <set-service-fields service-
>>> name="createPartyTelecomNumber" map="parameters" to-
>>> map="phoneContext"/>
>>> @@ -591,4 +629,4 @@
>>> </if-empty>
>>> <field-to-result field="contactMechId"/>
>>> </simple-method>
>>> -</simple-methods>
>>> \ No newline at end of file
>>> +</simple-methods>
>>>
>>>
>>
>
>
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Jacques Le Roux <ja...@les7arts.com>.
Ha no sorry,
I had also added findPartyFromTelephoneComplete some days ago and forgot about it. The others lines are simply superfluous white
spaces suppressed.
It was not supposed to be commited right now. But as it's useful, I have simply restored findPartyFromTelephone and cleaned the log
lines of findPartyFromTelephoneComplete in r822540
Thanks (I'm a bit tired...)
Jacques
From: "Scott Gray" <sc...@hotwaxmedia.com>
> Is it just me or was this commit much more than just "Fix a false log info"?
>
> Thanks
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 7/10/2009, at 12:29 PM, jleroux@apache.org wrote:
>
>> Author: jleroux
>> Date: Tue Oct 6 23:29:09 2009
>> New Revision: 822537
>>
>> URL: http://svn.apache.org/viewvc?rev=822537&view=rev
>> Log:
>> Fix a false log info
>>
>> Modified:
>> ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml
>>
>> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/ contact/PartyContactMechServices.xml
>> URL:
>> http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=822537&r1=822536&r2=822537&view=diff
>> = = = = = = = = ======================================================================
>> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml (original)
>> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/ PartyContactMechServices.xml Tue Oct 6 23:29:09 2009
>> @@ -56,11 +56,12 @@
>> <result-to-field result-name="contactMechId" field="newValue.contactMechId"/>
>> </call-service>
>> <log level="info" message="ContactMech created"/>
>> + <log level="info" message="Creating a PartyContactMech with id: ${newValue.contactMechId}"/>
>> <else>
>> <set field="newValue.contactMechId" from- field="parameters.contactMechId"/>
>> + <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/>
>> </else>
>> </if-empty>
>> - <log level="info" message="Creating a PartyContactMech with id: ${parameters.contactMechId}"/>
>> <set field="newValue.partyId" from- field="parameters.partyId"/>
>> <field-to-result field="newValue.contactMechId" result- name="contactMechId"/>
>> <field-to-request field="newValue.contactMechId" request- name="contactMechId"/>
>> @@ -301,21 +302,21 @@
>> </if-empty>
>> <set field="input.inputFields.infoString_ic" from- field="parameters.caseInsensitive"/>
>> <log level="info" message="findPartyFromEmailAddress with case insensitive search: ${parameters.caseInsensitive}"/>
>> -
>> +
>> <if-empty field="parameters.fromDate">
>> <set field="input.filterByDate" value="Y"/>
>> <else>
>> <set field="input.filterByDateValue" from- field="parameters.fromDate"/>
>> </else>
>> </if-empty>
>> -
>> +
>> <!-- try primary email address -->
>> <set field="input.inputFields.contactMechPurposeTypeId" value="PRIMARY_EMAIL"/>
>> <set field="input.entityName" value="PartyContactDetailByPurpose"/>
>> <call-service service-name="performFindItem" in-map- name="input">
>> <results-to-map map-name="results"/>
>> </call-service>
>> -
>> +
>> <!-- any other email address -->
>> <if-empty field="results.item">
>> <set field="input.entityName" value="PartyAndContactMech"/>
>> @@ -323,15 +324,15 @@
>> <call-service service-name="performFindItem" in-map- name="input">
>> <results-to-map map-name="results"/>
>> </call-service>
>> - </if-empty>
>> -
>> + </if-empty>
>> +
>> <if-not-empty field="results.item">
>> <field-to-result field="results.item.partyId" result- name="partyId"/>
>> <field-to-result field="results.item.contactMechId" result-name="contactMechId"/>
>> </if-not-empty>
>> -
>> +
>> </simple-method>
>> -
>> +
>> <simple-method method-name="findPartyFromTelephone" short- description="Find partyId from the telephone number">
>>
>> <entity-and entity-name="PartyAndContactMech" list="contactMechs" filter-by-date="true">
>> @@ -340,9 +341,46 @@
>>
>> <set field="dash" value="-"/>
>> <set field="emptyString" value=""/>
>> - <set field="inputTelno" value="$ {str:replaceAll(parameters.telno, dash, emptyString)}"/>
>> + <!--set field="inputTelno" value="$ {str:replaceAll(parameters.telno, dash, emptyString)}"/-->
>> + <log level="always" message="parameters.telno====================${parameters.telno}"></ log>
>> + <log level="always" message="inputTelno====================$ {inputTelno}"></log>
>> + <iterate entry="contactMech" list="contactMechs">
>> + <set field="telno" from- field="contactMech.tnContactNumber"/>
>> + <!--set field="telno" value="$ {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>> + <set field="partyId" from- field="contactMech.partyId"/>
>> + </if-compare-field>
>> + <set field="telno" value="${contactMech.tnAreaCode}$ {telno}"/>
>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>> + <set field="partyId" from- field="contactMech.partyId"/>
>> + </if-compare-field>
>> + <set field="telno" value="${contactMech.tnCountryCode}$ {telno}"/>
>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>> + <set field="partyId" from- field="contactMech.partyId"/>
>> + </if-compare-field>
>> + <set field="telno" value="+${telno}"/>
>> + <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>> + <set field="partyId" from- field="contactMech.partyId"/>
>> + </if-compare-field>
>> + </iterate>
>> + <if-not-empty field="partyId">
>> + <field-to-result field="partyId"/>
>> + <field-to-result field="contactMech.contactMechId" result-name="contactMechId"/>
>> + </if-not-empty>
>> + </simple-method>
>> +
>> + <simple-method method-name="findPartyFromTelephoneComplete" short-description="Find partyId from the telephone number">
>> +
>> + <entity-and entity-name="PartyAndContactMech" list="contactMechs" filter-by-date="true">
>> + <field-map field-name="contactMechTypeId" value="TELECOM_NUMBER"/>
>> + </entity-and>
>> +
>> + <set field="dash" value="-"/>
>> + <set field="emptyString" value=""/>
>> + <set field="inputTelno" from-field="parameters.telno"/>
>> <iterate entry="contactMech" list="contactMechs">
>> - <set field="telno" value="$ {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/>
>> + <set field="telno" from- field="contactMech.tnContactNumber"/>
>> + <!--set field="telno" value="$ {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
>> <if-compare-field field="inputTelno" operator="equals" to-field="telno">
>> <set field="partyId" from- field="contactMech.partyId"/>
>> </if-compare-field>
>> @@ -364,7 +402,7 @@
>> <field-to-result field="contactMech.contactMechId" result-name="contactMechId"/>
>> </if-not-empty>
>> </simple-method>
>> -
>> +
>> <simple-method method-name="createPostalAddressAndPurposes" short-description="Create postal address, purposes and set them
>> defaults" login-required="false">
>> <call-service service-name="createPartyPostalAddress" in-map- name="parameters">
>> <result-to-field result-name="contactMechId" field="parameters.contactMechId"/>
>> @@ -552,7 +590,7 @@
>> </call-service>
>> </if-not-empty>
>> </simple-method>
>> -
>> +
>> <simple-method method-name="createUpdatePartyEmailAddress" short- description="Create and update email address"
>> login-required="false">
>> <if-empty field="parameters.contactMechId">
>> <set-service-fields service- name="createPartyEmailAddress" map="parameters" to- map="emailAddressContext"/>
>> @@ -573,7 +611,7 @@
>> <field-to-result field="contactMech.infoString" result- name="emailAddress"/>
>> <field-to-result field="contactMechId"/>
>> </simple-method>
>> -
>> +
>> <simple-method method-name="createUpdatePartyTelecomNumber" short-description="Create and update phone number" login-
>> required="false">
>> <if-empty field="parameters.contactMechId">
>> <set-service-fields service- name="createPartyTelecomNumber" map="parameters" to- map="phoneContext"/>
>> @@ -591,4 +629,4 @@
>> </if-empty>
>> <field-to-result field="contactMechId"/>
>> </simple-method>
>> -</simple-methods>
>> \ No newline at end of file
>> +</simple-methods>
>>
>>
>
>
Re: svn commit: r822537 - /ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Is it just me or was this commit much more than just "Fix a false log
info"?
Thanks
Scott
HotWax Media
http://www.hotwaxmedia.com
On 7/10/2009, at 12:29 PM, jleroux@apache.org wrote:
> Author: jleroux
> Date: Tue Oct 6 23:29:09 2009
> New Revision: 822537
>
> URL: http://svn.apache.org/viewvc?rev=822537&view=rev
> Log:
> Fix a false log info
>
> Modified:
> ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
> PartyContactMechServices.xml
>
> Modified: ofbiz/trunk/applications/party/script/org/ofbiz/party/
> contact/PartyContactMechServices.xml
> URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml?rev=822537&r1=822536&r2=822537&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
> PartyContactMechServices.xml (original)
> +++ ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/
> PartyContactMechServices.xml Tue Oct 6 23:29:09 2009
> @@ -56,11 +56,12 @@
> <result-to-field result-name="contactMechId"
> field="newValue.contactMechId"/>
> </call-service>
> <log level="info" message="ContactMech created"/>
> + <log level="info" message="Creating a PartyContactMech
> with id: ${newValue.contactMechId}"/>
> <else>
> <set field="newValue.contactMechId" from-
> field="parameters.contactMechId"/>
> + <log level="info" message="Creating a
> PartyContactMech with id: ${parameters.contactMechId}"/>
> </else>
> </if-empty>
> - <log level="info" message="Creating a PartyContactMech with
> id: ${parameters.contactMechId}"/>
> <set field="newValue.partyId" from-
> field="parameters.partyId"/>
> <field-to-result field="newValue.contactMechId" result-
> name="contactMechId"/>
> <field-to-request field="newValue.contactMechId" request-
> name="contactMechId"/>
> @@ -301,21 +302,21 @@
> </if-empty>
> <set field="input.inputFields.infoString_ic" from-
> field="parameters.caseInsensitive"/>
> <log level="info" message="findPartyFromEmailAddress with
> case insensitive search: ${parameters.caseInsensitive}"/>
> -
> +
> <if-empty field="parameters.fromDate">
> <set field="input.filterByDate" value="Y"/>
> <else>
> <set field="input.filterByDateValue" from-
> field="parameters.fromDate"/>
> </else>
> </if-empty>
> -
> +
> <!-- try primary email address -->
> <set field="input.inputFields.contactMechPurposeTypeId"
> value="PRIMARY_EMAIL"/>
> <set field="input.entityName"
> value="PartyContactDetailByPurpose"/>
> <call-service service-name="performFindItem" in-map-
> name="input">
> <results-to-map map-name="results"/>
> </call-service>
> -
> +
> <!-- any other email address -->
> <if-empty field="results.item">
> <set field="input.entityName"
> value="PartyAndContactMech"/>
> @@ -323,15 +324,15 @@
> <call-service service-name="performFindItem" in-map-
> name="input">
> <results-to-map map-name="results"/>
> </call-service>
> - </if-empty>
> -
> + </if-empty>
> +
> <if-not-empty field="results.item">
> <field-to-result field="results.item.partyId" result-
> name="partyId"/>
> <field-to-result field="results.item.contactMechId"
> result-name="contactMechId"/>
> </if-not-empty>
> -
> +
> </simple-method>
> -
> +
> <simple-method method-name="findPartyFromTelephone" short-
> description="Find partyId from the telephone number">
>
> <entity-and entity-name="PartyAndContactMech"
> list="contactMechs" filter-by-date="true">
> @@ -340,9 +341,46 @@
>
> <set field="dash" value="-"/>
> <set field="emptyString" value=""/>
> - <set field="inputTelno" value="$
> {str:replaceAll(parameters.telno, dash, emptyString)}"/>
> + <!--set field="inputTelno" value="$
> {str:replaceAll(parameters.telno, dash, emptyString)}"/-->
> + <log level="always"
> message="parameters.telno====================${parameters.telno}"></
> log>
> + <log level="always" message="inputTelno====================$
> {inputTelno}"></log>
> + <iterate entry="contactMech" list="contactMechs">
> + <set field="telno" from-
> field="contactMech.tnContactNumber"/>
> + <!--set field="telno" value="$
> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
> + <if-compare-field field="inputTelno" operator="equals"
> to-field="telno">
> + <set field="partyId" from-
> field="contactMech.partyId"/>
> + </if-compare-field>
> + <set field="telno" value="${contactMech.tnAreaCode}$
> {telno}"/>
> + <if-compare-field field="inputTelno" operator="equals"
> to-field="telno">
> + <set field="partyId" from-
> field="contactMech.partyId"/>
> + </if-compare-field>
> + <set field="telno" value="${contactMech.tnCountryCode}$
> {telno}"/>
> + <if-compare-field field="inputTelno" operator="equals"
> to-field="telno">
> + <set field="partyId" from-
> field="contactMech.partyId"/>
> + </if-compare-field>
> + <set field="telno" value="+${telno}"/>
> + <if-compare-field field="inputTelno" operator="equals"
> to-field="telno">
> + <set field="partyId" from-
> field="contactMech.partyId"/>
> + </if-compare-field>
> + </iterate>
> + <if-not-empty field="partyId">
> + <field-to-result field="partyId"/>
> + <field-to-result field="contactMech.contactMechId"
> result-name="contactMechId"/>
> + </if-not-empty>
> + </simple-method>
> +
> + <simple-method method-name="findPartyFromTelephoneComplete"
> short-description="Find partyId from the telephone number">
> +
> + <entity-and entity-name="PartyAndContactMech"
> list="contactMechs" filter-by-date="true">
> + <field-map field-name="contactMechTypeId"
> value="TELECOM_NUMBER"/>
> + </entity-and>
> +
> + <set field="dash" value="-"/>
> + <set field="emptyString" value=""/>
> + <set field="inputTelno" from-field="parameters.telno"/>
> <iterate entry="contactMech" list="contactMechs">
> - <set field="telno" value="$
> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/>
> + <set field="telno" from-
> field="contactMech.tnContactNumber"/>
> + <!--set field="telno" value="$
> {str:replace(contactMech.tnContactNumber, dash, emptyString)}"/-->
> <if-compare-field field="inputTelno" operator="equals"
> to-field="telno">
> <set field="partyId" from-
> field="contactMech.partyId"/>
> </if-compare-field>
> @@ -364,7 +402,7 @@
> <field-to-result field="contactMech.contactMechId"
> result-name="contactMechId"/>
> </if-not-empty>
> </simple-method>
> -
> +
> <simple-method method-name="createPostalAddressAndPurposes"
> short-description="Create postal address, purposes and set them
> defaults" login-required="false">
> <call-service service-name="createPartyPostalAddress" in-map-
> name="parameters">
> <result-to-field result-name="contactMechId"
> field="parameters.contactMechId"/>
> @@ -552,7 +590,7 @@
> </call-service>
> </if-not-empty>
> </simple-method>
> -
> +
> <simple-method method-name="createUpdatePartyEmailAddress" short-
> description="Create and update email address" login-required="false">
> <if-empty field="parameters.contactMechId">
> <set-service-fields service-
> name="createPartyEmailAddress" map="parameters" to-
> map="emailAddressContext"/>
> @@ -573,7 +611,7 @@
> <field-to-result field="contactMech.infoString" result-
> name="emailAddress"/>
> <field-to-result field="contactMechId"/>
> </simple-method>
> -
> +
> <simple-method method-name="createUpdatePartyTelecomNumber"
> short-description="Create and update phone number" login-
> required="false">
> <if-empty field="parameters.contactMechId">
> <set-service-fields service-
> name="createPartyTelecomNumber" map="parameters" to-
> map="phoneContext"/>
> @@ -591,4 +629,4 @@
> </if-empty>
> <field-to-result field="contactMechId"/>
> </simple-method>
> -</simple-methods>
> \ No newline at end of file
> +</simple-methods>
>
>