Project

General

Profile

Actions

Defect #1449

closed

Form attribute is searched in all definition

Added by Ondřej Kopr almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
High
Assignee:
Peter Štrunc
Target version:
-
Start date:
01/15/2019
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

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

missing.gif (1.28 MB) missing.gif Ondřej Kopr, 01/16/2019 01:29 PM
Actions #1

Updated by Ondřej Kopr almost 6 years ago

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 :(

Actions #2

Updated by Peter Štrunc almost 6 years ago

  • Status changed from New to In Progress
Actions #3

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.

Actions #4

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

Actions #5

Updated by Radek Tomiška over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF