When a user updates (adds, removes, or changes) an Organization's parent organization, the tree path for that organization and all of its child organizations should update to reflect the new parent. This does not happen properly when adding a new parent, only when removing a parent.
Steps to reproduce:
- Follow steps 1-4 of
- Look at the treePath column of the Organization_ table
Each organization will have full treepaths containing the ids of all their ancestors
Each treepath is at most 2 org id's in length
This happens because we are using too specific a query when re-building the treepaths of an organization (see OrganizationLocalServiceImpl.java).