Author: ashish
Date: Sat Dec 20 13:18:55 2014
New Revision: 1646975
URL:
http://svn.apache.org/r1646975Log:
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/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy
Modified: ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy?rev=1646975&r1=1646974&r2=1646975&view=diff==============================================================================
--- ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy (original)
+++ ofbiz/trunk/applications/humanres/webapp/humanres/WEB-INF/actions/category/CategoryTree.groovy Sat Dec 20 13:18:55 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 = from("PartyGroup").where("partyId", partyRelationship.getString("partyIdTo")).queryOne();
- 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"));