The HR application tree does not display the correct names of the employees
Clicking on the incorrectly displayed name however brings up the correct
employee profile
i believe there is a problem with fuction getCurrentEmployeeDetails in
org/apache/ofbiz/humanres/HumanResEvents.java
carrying out the following changes on the function results in correct display
Let me know if i am missing something
Regards
Kamanu
if (UtilValidate.isNotEmpty(emlpfillCtxs)) {
for (GenericValue emlpfillCtx : emlpfillCtxs ) {
String memberId = emlpfillCtx.getString("partyId");
//GenericValue memCtx =
EntityQuery.use(delegator).from("Person").where("partyId", partyId).queryOne();
GenericValue memCtx =
EntityQuery.use(delegator).from("Person").where("partyId", memberId).queryOne();
String title = null;
if (UtilValidate.isNotEmpty(memCtx)) {
String firstname = memCtx.getString("firstName");
String lastname = memCtx.getString("lastName");
if (UtilValidate.isEmpty(lastname)) {
lastname = "";
}
if (UtilValidate.isEmpty(firstname)) {
firstname = "";
}
title = firstname +" "+ lastname;
}
else {
GenericValue memGroupCtx =
EntityQuery.use(delegator).from("PartyGroup").where("partyId",
partyId).queryOne();
if (UtilValidate.isNotEmpty(memGroupCtx)) {
title = memGroupCtx.getString("groupName");
}
}