ofbiz-framework icon indicating copy to clipboard operation
ofbiz-framework copied to clipboard

OFBIZ-11683 Fixed: Humanres tree allows existing OU to be added again

Open SebastianEcomify opened this issue 4 years ago • 4 comments

Fixed: Humanres tree allows existing OU to be added again (OFBIZ-11683)

roleTypeId 'INTERNAL_ORGANIZATIO' is added for PartyRelationship in the DemoData to prevent duplicate entries.

Thanks Pierre Smiths for reporting the issue

SebastianEcomify avatar Mar 02 '21 08:03 SebastianEcomify

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

sonarqubecloud[bot] avatar Mar 02 '21 08:03 sonarqubecloud[bot]

HJi Sebastian,

I tested and after adding the data I was able to add a "company" to "company" as it exists in trunk HEAD. Then you get an infitinte recursive tree that does not seem to fit to me.

Also please comment your change to be used in the description of the commit and of course to better understand what you are doing, TIA

JacquesLeRoux avatar Mar 02 '21 16:03 JacquesLeRoux

Hi Sebastian, all,

We should not regard departments as internal organisations (we should reserve that for fiscal/legal entities, requiring their own CoAs).

The roll-up for departments should be: <PartyRelationship partyIdFrom="Company" partyIdTo="MARKETING" partyRelationshipTypeId="GROUP_ROLLUP" roleTypeIdFrom="INTERNAL_ORGANIZATIO" roleTypeIdTo="DEPARTMENT" fromDate="2001-05-13 00:00:00.000"/>

Best regards, Pierre

PierreSmits avatar May 17 '21 10:05 PierreSmits

Hi,

Why are you treating departments of the internal organisation (partyID=company) as internal organisations as well? Should these have their own accounting preferences, as well as having their own gl schema?

Clearly, departments, teams, etc. should not be treated as internal organisations but rather as what they are intended to portray.

PierreSmits avatar Oct 27 '21 15:10 PierreSmits