Project

General

Profile

Defect #1441

Synchronize same structure to more organization structures will not create nodes in the other ones.

Added by Roman Kučera 6 months ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Synchronization
Target version:
Start date:
01/11/2019
Due date:
% Done:

100%


Description

Wrong behavior, when you want synchronize same organization structure to more organization structures. It will not create new nodes in to other structure but update the entities in the first one.

Steps to replicate:
Create default Org structure, create secondary structure
Create two systems, first will synchronize to default structure, second will synchronize to the secondary structure.
Run synchronization for the default structure. - Nodes are created correctly in the default one
Run synchronization for the secondary structure - It will create link to the entities in the default structure and it will not create nodes in the secondary structure as expected.

This problem is only when you want have nodes with same code in more structures. When you run synchronization to secondary structure with different data which is not in default one it will correctly create nodes in the secondary.

History

#1 Updated by Vít Švanda 6 months ago

  • Target version set to Quartz (9.6.0)

I confirms this bug. Problem is in correlation filter, where is filtering by code (in this case). Code is not unique in TreeNode, so we need to filtering only for one TreeType. Solution is not easy, because in correlation method (abstract sync) I do not have access to sync-context, so I don't know what tree type is using (interface of sync should be changed).

Workaround, create synthetic unique code in TreeNode.externalId (prefix+code) and then uses externalId as correlation attribute.

#2 Updated by Vít Švanda 6 months ago

  • Target version changed from Quartz (9.6.0) to Opal (9.4.0)

#3 Updated by Vít Švanda 6 months ago

  • Status changed from New to In Progress

#4 Updated by Vít Švanda 6 months ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 0 to 90

I fixed this problem.
- Method "getEntityFilter" now has attribute SynchronizationContext.
- Method "findByAttribute" was abstracted from all sync implementations to the abstract syncrhonization executor.
- I also crated test.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/e00a2a99d300d6306e754f134a129edd594503c5

#5 Updated by Radek Tomiška 5 months ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 90 to 100

I did test and review, it works and code looks nice, thx!

#6 Updated by Vít Švanda 5 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF