svn commit: r720570 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml applications/party/servicedef/services.xml framework/common/config/general.properties

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r720570 - in /ofbiz/trunk: applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml applications/party/servicedef/services.xml framework/common/config/general.properties

sichen
Author: sichen
Date: Tue Nov 25 11:40:33 2008
New Revision: 720570

URL: http://svn.apache.org/viewvc?rev=720570&view=rev
Log:
Allow email matching to be non case sensitive, so [hidden email] would map to [hidden email]

Modified:
    ofbiz/trunk/applications/party/script/org/ofbiz/party/contact/PartyContactMechServices.xml
    ofbiz/trunk/applications/party/servicedef/services.xml
    ofbiz/trunk/framework/common/config/general.properties

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=720570&r1=720569&r2=720570&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 Nov 25 11:40:33 2008
@@ -293,6 +293,14 @@
         <set field="input.entityName" value="PartyAndContactMech"/>
         <set field="input.filterByDate" value="Y"/>
         <set field="input.inputFields.infoString" from-field="parameters.address"/>
+        <if-empty map-name="parameters" field-name="caseInsensitive">
+            <call-bsh><![CDATA[
+                String caseInsensitiveEmail = org.ofbiz.base.util.UtilProperties.getPropertyValue("general.properties", "mail.address.caseInsensitive", "N");
+                parameters.put("caseInsensitive", caseInsensitiveEmail);
+            ]]></call-bsh>
+        </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">
             <now-timestamp-to-env env-name="input.filterByDateValue"/>

Modified: ofbiz/trunk/applications/party/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/servicedef/services.xml?rev=720570&r1=720569&r2=720570&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/party/servicedef/services.xml Tue Nov 25 11:40:33 2008
@@ -379,6 +379,7 @@
             location="org/ofbiz/party/contact/PartyContactMechServices.xml" invoke="findPartyFromEmailAddress" auth="true">
         <description>Find the partyId/contactMechId for a specific email address, if not found do not return a value</description>
         <attribute name="address" type="String" mode="IN" optional="false"/>
+        <attribute name="caseInsensitive" type="String" mode="IN" optional="true"/>
         <attribute name="personal" type="String" mode="IN" optional="true"/><!-- field not used -->
         <attribute name="fromDate" type="Timestamp" mode="IN" optional="true"/>
         <attribute name="partyId" type="String" mode="OUT" optional="true"/>

Modified: ofbiz/trunk/framework/common/config/general.properties
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/config/general.properties?rev=720570&r1=720569&r2=720570&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/config/general.properties (original)
+++ ofbiz/trunk/framework/common/config/general.properties Tue Nov 25 11:40:33 2008
@@ -73,6 +73,9 @@
 #--Fallback [true|false] determines whether you will allow a non secure connection if you are unable to get a secure one
 #mail.smtp.socketFactory.fallback=false
 
+# -- how the address are matched with the CRM addresses
+mail.address.caseInsensitive=Y
+
 # -- debug SMTP mail option enabled (Y|N)
 mail.debug.on=N