Project

General

Profile

Actions

Defect #1441

closed

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

Added by Roman Kučera almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Synchronization
Target version:
Start date:
01/11/2019
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

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.

Actions #1

Updated by Vít Švanda almost 6 years 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.

Actions #2

Updated by Vít Švanda almost 6 years ago

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

Updated by Vít Švanda almost 6 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Vít Švanda almost 6 years 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

Actions #5

Updated by Radek Tomiška almost 6 years 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!

Actions #6

Updated by Vít Švanda almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF