Feature #2452
open
Unexpected transformation of a single-valued EAV when the schema attribute is multivalued (LDAP attributes filled from EAVs contain square brackets)
Added by Alena Peterová over 4 years ago.
Updated almost 2 years ago.
Description
Tested on versions 9.7.16, 10.4.1
Steps to reproduce:
- Create a multivalued schema attribute
- Map it to a single-valued EAV and set a transformation script return "bxxxxn" + attributeValue;
- The attribute for provisioning contains square brackets []
I would expect, that the input of the transformation script "attributeValue" would be the exact value of EAV - a single-valued String in this case. But the input is a List.
This looks like a stupid use-case, but unfortunately, it can happen, because LDAP connector generates most of the attributes as Multivalued (this is probably some default setting in the LDAP scheme :-( ).
Files
- Target version set to 10.6.0
I checked code and the attributeValue is controlled by the schema. It means, if schema attribute is multivalued, then attributeValue is wrapped to the list. Goal for this was preapare data for provisioning in case, when the transformation to the system is empty, because for a provisioning is directly use the attributeValue in this case (this is the reason, why is a list).
I can modified this and wrapping output value of this script (not input). I am affraid for backwards compatibility. If some projects counts with the attributeValue is list, then after my change will be this scripts broken.
So the question now is, should I made this potentially incompatible change? (May be we can discuss this topic on the product presentation.)
- Tracker changed from Defect to Feature
- Target version deleted (
10.6.0)
- Affected versions deleted (
Rhyolite (9.7.16), 10.2.0, 10.0.2, 10.3.0, 10.3.1, 10.3.2, Rhyolite (9.7.17), 10.3.3, 10.4.0, 10.4.1)
I came across a strange behavior for a reversed situation, which is probably caused by the same part of the code:
- EAV is multivalued
- schema attribute is single-valued String
- I want to transform the (multivalued) attributeValue to some String
- the transformation script gets only the first value of the EAV in the variable attributeValue
Also available in: Atom
PDF