rdmo
rdmo copied to clipboard
[DMP Review] enable multiple combined evaluations of relations for conditions
Rationale / Begründung
Conditions are currently targeting only one attribute and are resolved for a single relation. It should be possible to evaluate multiple attributes in one condition each against different target texts/options.
These conditions can be connected via AND or OR.
In the edit Condition interface:
- support for multiple sources that can be related via "AND / OR", for example via a tabbed menu interface.
- Add a tab view for each source allowing the user to add or remove it
- Add a Radio-button "AND / OR" to switch between the type of conditional
PS it might sound like a ConditionSet but it should be editable as a normal Condition in order to not overflow the UI with complexity.
Affected
Users, Managers
Minimal functionality
- allow for multiple relations that are combined when a Condition is resolved
- add the required new settings to the edit Condition interface
Nice-to-have functionality
References / Verweise
- https://github.com/search?q=repo%3Ardmorganiser%2Frdmo+%5BDMP+Review%5D&type=issues
- https://github.com/rdmorganiser/rdmo/blob/c945d7d9ef5efdccb2d7b41b914ff50ea6f7b49c/rdmo/conditions/models.py#L118
I think the OR part can already be done with multiple conditions on one element (https://github.com/rdmorganiser/rdmo/blob/main/rdmo/projects/utils.py#L31). The AND part can be complicated to implement.
We also have this need. We have a set of questions which are dependent from a derived variable DIL, defined from the answer to two questions CU and CP as follows:
DIL = if(CU==1)1 else max(CU,CP)