Project

General

Profile

Actions

Defect #3039

closed

Synchronization from system - multivalued EAV attribute is not deleted when the new value is an empty List

Added by Alena Peterová over 2 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Tomáš Doischer
Category:
Attribute mapping
Target version:
Start date:
01/18/2022
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Tested on 11.2.1.

We have a multivalued EAV attribute filled by the synchronization from the system. We use a transformation script, which returns ArrayList of values. This is filled into identity EAV:

Mapping:

When the result of the transformation is an empty list (as below), then the value from the identity is not deleted .

List<String> result = new ArrayList<>();
....
return result;

In the version 9.7, this worked well. It stopped working after upgrading to 11.2.1. There is no info about this change in the CHANGELOG.

Workaround: return the value as null. Then the EAV is deleted correctly.

Note: It's interesting that the synchronization tells us that something changes, but in the end, it doesn't make the change:

DEBUG xxxShouldSyncxxxxxPermission attributeValue []
DEBUG xxxShouldSyncxxxxxPermission result []
[base-task-executor-4] e.b.idm.acc.service.impl.AbstractSynchronizationExecutor.addToItemLog : 18.01.2022 17:52:20: Value of EAV attribute [opravneni_xxx] was changed. First change was detected -> entity in IdM will be updated.


Files

attribute_schema.png (20.2 KB) attribute_schema.png Alena Peterová, 01/18/2022 05:00 PM
attribute_mapping.png (94.8 KB) attribute_mapping.png Alena Peterová, 01/18/2022 05:00 PM
multivalued_attribute.png (2.48 KB) multivalued_attribute.png Alena Peterová, 01/18/2022 05:00 PM
Actions #1

Updated by Peter Štrunc about 2 years ago

  • Target version set to 12.2.0
Actions #2

Updated by Roman Kučera almost 2 years ago

  • Target version changed from 12.2.0 to 13.0.0
Actions #3

Updated by Tomáš Doischer almost 2 years ago

  • Status changed from New to In Progress
  • Assignee changed from Peter Štrunc to Tomáš Doischer
Actions #4

Updated by Tomáš Doischer almost 2 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Tomáš Doischer to Roman Kučera
  • % Done changed from 0 to 80

Fixed. This was changed along with the differential synchronization and this case was not covered.

PR: https://github.com/bcvsolutions/CzechIdMng/pull/217

Can you please give me feedback?

Actions #5

Updated by Roman Kučera almost 2 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Roman Kučera to Tomáš Doischer
  • % Done changed from 80 to 100

Thx, works great.
Merged into develop

Actions #6

Updated by Tomáš Doischer about 1 year ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF