Author: ashish
Date: Sat Dec 20 13:28:40 2014
New Revision: 1646976
URL:
http://svn.apache.org/r1646976Log:
Applied bug fix from trunk r1646975.
========================================================================
Applied patch from jira issue - OFBIZ-5696 - Main page doesn't show organisation tree in HumanRes.
Thanks Pierre for reporting the issue. Thanks Deepak for providing the patch.
========================================================================
Modified:
ofbiz/branches/release13.07/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy
Modified: ofbiz/branches/release13.07/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release13.07/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy?rev=1646976&r1=1646975&r2=1646976&view=diff==============================================================================
--- ofbiz/branches/release13.07/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/branches/release13.07/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy Sat Dec 20 13:28:40 2014
@@ -23,6 +23,7 @@
*/
import org.ofbiz.entity.util.EntityUtil;
import org.ofbiz.base.util.*;
+import org.ofbiz.party.party.PartyHelper;
import org.ofbiz.product.catalog.*;
import org.ofbiz.product.category.*;
import javolution.util.FastMap;
@@ -51,10 +52,9 @@ if (partyRelationships) {
//child
for(partyRelationship in partyRelationships) {
- partyGroup = delegator.findOne("PartyGroup", [partyId : partyRelationship.getString("partyIdTo")], false);
- partyGroupMap = FastMap.newInstance();
- partyGroupMap.put("partyId", partyGroup.getString("partyId"));
- partyGroupMap.put("groupName", partyGroup.getString("groupName"));
+ partyGroupMap = [:];
+ partyGroupMap.put("partyId", partyRelationship.getString("partyIdTo"));
+ partyGroupMap.put("groupName", PartyHelper.getPartyName(delegator, partyRelationship.getString("partyIdTo"), false));
completedTreeContext.add(partyGroupMap);
subtopLists.addAll(partyRelationship.getString("partyIdTo"));