Better handling of changed ACTIVITYGROUPS #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch improves the handling of changed activitygroups if the ACTIVITYGROUPS.AGR_NAME field will be used
in the resource configuration.
If you would implement the resource configuration with an association from the user to the activitygroup via the
AGR_NAME field, midpoint will write down the whole attribute again when changing one entry in the list.
Because the AGR_NAME field only stores AGR_NAMEs it has no information on the current from/to dates in the actual activitygroups
field and will simply overwrite everything in the SAP with empty from/to fields. SAP generates the current date as a from date
so if you have a role change on another date every role in the SAP will be deleted and added again. All the information
about the actual date of assignment will be lost. This also generates a lot of audit entries in the SAP.
To avoid this, this patch loads the current state of the user from the SAP and uses the existing data if nothing has
provided by midpoint. To propagate actual changes in the ACTIVITYGROUPS from/to fields the change algorithm will check if
the attributes from the midpoint are xml attributes. If yes it will simply use those values because they have the biggest
accuracy. If not it will use the current data from the SAP for those values.