Ah, also you may have been confused by the fact that few demo data contain employees with partyId equal to name. But you can't create such data with the OOTB UI. The partyId is a number automatically created.
Le 07/05/2022 à 09:57, Jacques Le Roux a écrit :
Hi Kamanu, Fist please don't hijack a thread (here "CSP HTTP header causes console errors") to send your messages. Rather create a new one by sending your own created email and not responding to an existing one, TIA. I tried but could not reproduce. Please reproduce the issue on the demo site. When your do so remember that the changes are swiped every day at 3 UTC. Also then please follow https://cwiki.apache.org/confluence/display/OFBIZ/OFBiz+Contributors+Best+Practices TL;DR: create a Jira and attach a patch. An uploaded image there could also fits rather than reproducing on demo site... HTH Jacques Le 06/05/2022 à 12:07, S Munene a écrit :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"); } }
