svn commit: r466022 - /incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml

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

svn commit: r466022 - /incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml

jleroux@apache.org
Author: jleroux
Date: Fri Oct 20 00:37:50 2006
New Revision: 466022

URL: http://svn.apache.org/viewvc?view=rev&rev=466022
Log:
A patch from Chris Howe : "Suppress Warnings for getPartyNameForDate method" (https://issues.apache.org/jira/browse/OFBIZ-395)

Modified:
    incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml

Modified: incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml?view=diff&rev=466022&r1=466021&r2=466022
==============================================================================
--- incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml (original)
+++ incubator/ofbiz/trunk/applications/party/script/org/ofbiz/party/party/PartyServices.xml Fri Oct 20 00:37:50 2006
@@ -73,13 +73,17 @@
         </if>        
     </simple-method>
     <simple-method method-name="getPartyNameForDate" short-description="Get Party Name For Date">
+
         <entity-and entity-name="PartyNameHistory" list-name="partyNameHistoryList">
             <field-map field-name="partyId" env-name="parameters.partyId"/>
             <order-by field-name="-changeDate"/>
         </entity-and>
         <entity-one entity-name="Person" value-name="person"/>
         <entity-one entity-name="PartyGroup" value-name="partyGroup"/>
-
+ <if-empty field-name="parameters.compareDate">
+            <now-timestamp-to-env env-name="nowTimestamp"/>
+ <set field="parameters.compareDate" from-field="nowTimestamp"/>
+ </if-empty>
         <!-- fill compare date with todays date if not provided -->
         <if-empty field-name="parameters.compareDate">
             <now-timestamp-to-env env-name="parameters.compareDate"/>
@@ -95,10 +99,17 @@
         <if-empty field-name="partyNameHistoryCurrent">
             <if-not-empty field-name="person">
                 <field-to-result field-name="person.firstName" result-name="firstName"/>
+                <if-not-empty field-name="person.middleName">
                 <field-to-result field-name="person.middleName" result-name="middleName"/>
+                </if-not-empty>
                 <field-to-result field-name="person.lastName" result-name="lastName"/>
+                <if-not-empty field-name="person.personalTitle">
                 <field-to-result field-name="person.personalTitle" result-name="personalTitle"/>
+                </if-not-empty>
+                <if-not-empty field-name="person.suffix">
                 <field-to-result field-name="person.suffix" result-name="suffix"/>
+                </if-not-empty>
+
 
                 <if-compare field-name="parameters.lastNameFirst" operator="equals" value="Y">
                     <set field="fullName" value="${person.personalTitle} ${person.lastName}, ${person.firstName} ${person.middleName} ${person.suffix}"/>
@@ -119,10 +130,17 @@
                 <!-- partyNameHistoryCurrent has a value -->
                 <if-not-empty field-name="person">
                     <field-to-result field-name="partyNameHistoryCurrent.firstName" result-name="firstName"/>
+                    <if-not-empty field-name="partyNameHistoryCurrent.middleName">
                     <field-to-result field-name="partyNameHistoryCurrent.middleName" result-name="middleName"/>
+                    </if-not-empty>
                     <field-to-result field-name="partyNameHistoryCurrent.lastName" result-name="lastName"/>
+                    <if-not-empty field-name="partyNameHistoryCurrent.personalTitle">
                     <field-to-result field-name="partyNameHistoryCurrent.personalTitle" result-name="personalTitle"/>
+                    </if-not-empty>
+                    <if-not-empty field-name="partyNameHistoryCurrent.suffix">
                     <field-to-result field-name="partyNameHistoryCurrent.suffix" result-name="suffix"/>
+                    </if-not-empty>
+                    
                     
                     <if-compare field-name="parameters.lastNameFirst" operator="equals" value="Y">
                         <set field="fullName" value="${partyNameHistoryCurrent.personalTitle} ${partyNameHistoryCurrent.lastName}, ${partyNameHistoryCurrent.firstName} ${partyNameHistoryCurrent.middleName} ${partyNameHistoryCurrent.suffix}"/>