waltz icon indicating copy to clipboard operation
waltz copied to clipboard

Person Hierarchy should be part of entity_hierarchy

Open davidwatkins73 opened this issue 7 years ago • 4 comments

Or more precisely it does not write anything which causes hierarchy lookups on that one thing to fail ;)

davidwatkins73 avatar Sep 08 '17 07:09 davidwatkins73

Cannot reproduce this, have deleted all except 1 datatype and then rebuilt hierarchy successfully. The one node appears in entity hierarchy and the page for that datatype also appears to work without errors.

kamransaleem avatar Oct 05 '17 13:10 kamransaleem

I think tHis happened on person hierarchy...

On Thu, 5 Oct 2017 at 14:34, kamransaleem [email protected] wrote:

Cannot reproduce this, have deleted all except 1 datatype and then rebuilt hierarchy successfully. The one node appears in entity hierarchy and the page for that datatype also appears to work without errors.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/khartec/waltz/issues/2555#issuecomment-334466178, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjNPcONgXWypGF8PqNAB3uOBpy_61oGks5spNrMgaJpZM4PQ0V7 .

davidwatkins73 avatar Oct 05 '17 13:10 davidwatkins73

It appears the the person hierarchy is constructed differently to the entity hierarchy in that the person hierarchy doesn't include a self reference node in the hierarchy like the entity hierarchy does.

If we are going to change this perhaps it makes sense to consolidate the person_hierarchy table into entity_hierarchy. The person_hierarchy uses the employee id (external id) to key off but I don't see any pressing reason to do it this way.

Thoughts?

kamransaleem avatar Oct 05 '17 14:10 kamransaleem

Following on from Kams (2017) comment.

  • [ ] add a parent_id column to the person table
  • [ ] update EntityHieararchyService:determineTableToRebuild to reference person table
  • [ ] verify rebuild is happening
  • [ ] add to admin UI
  • [ ] update selectors to use entity_hierarchy table (not person_hierarchy)
    • [ ] AppIdSelectorFactory etc...
  • [ ] update the system job to ensure it rebuilds the correct hierarchy (possibly do both for a release or two)
  • [ ] remove existing PersonHiearchy* java code
  • [ ] update table docs to indicate table will be removed 1.xx

davidwatkins73 avatar Jun 06 '22 14:06 davidwatkins73