svn commit: r1849520 - in /ofbiz/branches/release16.11/applications/party: servicedef/services_view.xml src/main/java/org/apache/ofbiz/party/party/PartyServices.java widget/partymgr/PartyForms.xml

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

svn commit: r1849520 - in /ofbiz/branches/release16.11/applications/party: servicedef/services_view.xml src/main/java/org/apache/ofbiz/party/party/PartyServices.java widget/partymgr/PartyForms.xml

surajk
Author: surajk
Date: Sat Dec 22 05:48:45 2018
New Revision: 1849520

URL: http://svn.apache.org/viewvc?rev=1849520&view=rev
Log:
Fixed: Classification group filter not working on find party screen.
(OFBIZ-10580)
Thanks Anushi Gupta for reporting, Saurabh Dixit for providing the patch and Jacques Le Roux for reviewing it.

Modified:
    ofbiz/branches/release16.11/applications/party/servicedef/services_view.xml
    ofbiz/branches/release16.11/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
    ofbiz/branches/release16.11/applications/party/widget/partymgr/PartyForms.xml

Modified: ofbiz/branches/release16.11/applications/party/servicedef/services_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/party/servicedef/services_view.xml?rev=1849520&r1=1849519&r2=1849520&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/party/servicedef/services_view.xml (original)
+++ ofbiz/branches/release16.11/applications/party/servicedef/services_view.xml Sat Dec 22 05:48:45 2018
@@ -104,6 +104,7 @@ under the License.
         <attribute name="partyRelationshipTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="ownerPartyIds" type="List" mode="IN" optional="true"/><!-- Lead Owners Parties -->
         <attribute name="sortField" type="String" mode="IN" optional="true"/>
+        <attribute name="partyClassificationGroupId" type="String" mode="IN" optional="true"/>
 
         <attribute name="listIt" type="org.apache.ofbiz.entity.util.EntityListIterator" mode="OUT" optional="true"/>
     </service>

Modified: ofbiz/branches/release16.11/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java?rev=1849520&r1=1849519&r2=1849520&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/branches/release16.11/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java Sat Dec 22 05:48:45 2018
@@ -1729,6 +1729,22 @@ public class PartyServices {
         }
 
         // ----
+        // PartyClassificationGroup Fields
+        // ----
+
+        String partyClassificationGroupId = (String) context.get("partyClassificationGroupId");
+        if (UtilValidate.isNotEmpty(partyClassificationGroupId)) {
+            // add PartyClassification to view
+            dynamicView.addMemberEntity("PC", "PartyClassification");
+            dynamicView.addAlias("PC", "partyClassificationGroupId");
+            dynamicView.addViewLink("PT", "PC", Boolean.FALSE, ModelKeyMap.makeKeyMapList("partyId"));
+
+            // add the expr
+            andExprs.add(EntityCondition.makeCondition("partyClassificationGroupId", partyClassificationGroupId));
+            fieldsToSelect.add("partyClassificationGroupId");
+        }
+
+        // ----
         // PartyIdentification Fields
         // ----
 

Modified: ofbiz/branches/release16.11/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release16.11/applications/party/widget/partymgr/PartyForms.xml?rev=1849520&r1=1849519&r2=1849520&view=diff
==============================================================================
--- ofbiz/branches/release16.11/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/branches/release16.11/applications/party/widget/partymgr/PartyForms.xml Sat Dec 22 05:48:45 2018
@@ -80,8 +80,8 @@ under the License.
         </field>
         <field name="partyClassificationGroupId" title="${uiLabelMap.PartyClassificationGroup}" use-when="parentTypeId == null">
             <drop-down allow-multiple="true" size="5" allow-empty="false">
-                <entity-options entity-name="PartyClassificationGroupAndType" description="${typeDescription}" key-field-name="partyClassificationTypeId">
-                    <entity-order-by field-name="partyClassificationTypeId"/>
+                <entity-options entity-name="PartyClassificationGroupAndType" description="${typeDescription}" key-field-name="partyClassificationGroupId">
+                    <entity-order-by field-name="partyClassificationGroupId"/>
                 </entity-options>
             </drop-down>
         </field>
@@ -148,6 +148,7 @@ under the License.
                 <parameter param-name="partyId"/>
             </hyperlink>
         </field>
+        <field name="ClassificationGroup"><display description="${parameters.partyClassificationGroupId}"/></field>
         <field name="userLoginId" use-when="userLoginSize > 1"><include-grid name="ListPartyUserLogin" location="component://party/widget/partymgr/PartyForms.xml"/></field>
         <field name="userLoginId" use-when="userLoginSize == 1"><display description="${logins[0].userLoginId}"/></field>
         <field name="userLoginId" use-when="userLoginSize == 0"><display description="(${uiLabelMap.CommonNone})"/></field>