You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by su...@apache.org on 2018/12/22 05:45:59 UTC

svn commit: r1849519 - in /ofbiz/ofbiz-framework/branches/release17.12/applications/party: servicedef/services_view.xml src/main/java/org/apache/ofbiz/party/party/PartyServices.java widget/partymgr/PartyForms.xml

Author: surajk
Date: Sat Dec 22 05:45:58 2018
New Revision: 1849519

URL: http://svn.apache.org/viewvc?rev=1849519&view=rev
Log:
Fixed: Classification group filter not working on find party screen.
(OFBIZ-10580)

Modified:
    ofbiz/ofbiz-framework/branches/release17.12/applications/party/servicedef/services_view.xml
    ofbiz/ofbiz-framework/branches/release17.12/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
    ofbiz/ofbiz-framework/branches/release17.12/applications/party/widget/partymgr/PartyForms.xml

Modified: ofbiz/ofbiz-framework/branches/release17.12/applications/party/servicedef/services_view.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/party/servicedef/services_view.xml?rev=1849519&r1=1849518&r2=1849519&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/party/servicedef/services_view.xml (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/party/servicedef/services_view.xml Sat Dec 22 05:45:58 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/ofbiz-framework/branches/release17.12/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java?rev=1849519&r1=1849518&r2=1849519&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/party/src/main/java/org/apache/ofbiz/party/party/PartyServices.java Sat Dec 22 05:45:58 2018
@@ -1415,6 +1415,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/ofbiz-framework/branches/release17.12/applications/party/widget/partymgr/PartyForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/branches/release17.12/applications/party/widget/partymgr/PartyForms.xml?rev=1849519&r1=1849518&r2=1849519&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/branches/release17.12/applications/party/widget/partymgr/PartyForms.xml (original)
+++ ofbiz/ofbiz-framework/branches/release17.12/applications/party/widget/partymgr/PartyForms.xml Sat Dec 22 05:45:58 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>