Defect #1449
closedForm attribute is searched in all definition
100%
Description
This is probably big problem because method IdmFormAttributeDto getIdmFormAttributeDto(String code) search by code attribute but not by definition type. So if I have form attribute with code 'organization' for tree nodes is founded this attribute and in self registration is used for example default value from this wrong attribute.
private IdmFormAttributeDto getIdmFormAttributeDto(String code) { IdmFormAttributeFilter filter = new IdmFormAttributeFilter(); filter.setCode(code); return formAttributeService.find(filter, null).getContent().stream() .findFirst().orElseThrow(() -> new ResultCodeException(RegResultCode.WRONG_CONFIGURATION_DATA, "No IdMFormAttribute found for code " + code + ". Please check your configuration.")); }
Affected version: 2.1.0
Files
Updated by Ondřej Kopr almost 6 years ago
- File missing.gif missing.gif added
This is bigger problem than I expect :( because now registration skip some attributes during self registration, see gif. No is this little bit showstopper for my project and really big potential problem for existing project.
Use case:
I created new virtual system with no changes. Generated mapping contains firstName, then I created firstName for selfregistration module. But the attribute firstName from selfregistration will not be never used :(
Updated by Peter Štrunc almost 6 years ago
- Status changed from New to In Progress
Updated by Peter Štrunc almost 6 years ago
- % Done changed from 0 to 80
I pushed fix and test to develop. Unfortunately i was not able to test it reliably, since searches return random order, so i was not even able to write a test, that would fail without the fix. I keep this open in case ill come up with some better solution.
Updated by Patrik Stloukal almost 6 years ago
- Status changed from In Progress to Resolved
- % Done changed from 80 to 100
we made a small change
commit: https://git.bcvsolutions.eu/modules/reg/commit/9f828c242305d01ef0291f64ae376dbbcdca7633
but it seems that in future it would need better fix.
it is released.
Thank you :D
Updated by Radek Tomiška over 5 years ago
- Status changed from Resolved to Closed