-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
When evaluating outbound exports, the ExportEvaluationServer.CreateAttributeValueChanges method creates PendingExportAttributeValueChange entries based on MVO attribute changes, but never compares the pending export value against the existing CSO attribute value.
This results in unnecessary pending exports being created when the CSO already has the same value as what would be exported.
Steps to Reproduce
- AD has User A with
displayName = "Elliot Davies" - JIM imports → CSO has
displayName = "Elliot Davies" - JIM syncs → MVO gets
displayName = "Elliot Davies"(this registers as a 'change' to the MVO) - Export evaluation → Creates pending export for
displayName = "Elliot Davies" - Bug: Code never checks that CSO already has
displayName = "Elliot Davies"
Expected Behaviour
The export evaluation should compare the pending export value against the existing CSO attribute value and skip creating a pending export if they match (no-net-change).
Actual Behaviour
Pending exports are created even when the CSO already has the identical value, resulting in:
- Unnecessary pending exports cluttering the UI
- Wasted export/import cycles
- Confusing UX where pending export values match CSO values
Root Cause
In JIM.Application/Servers/ExportEvaluationServer.cs, the CreateAttributeValueChanges method (lines 741-913) checks if MVO attributes changed but never loads or compares against the CSO's current attribute values.
Proposed Fix
In CreateAttributeValueChanges, before adding an attribute change:
- Load the existing CSO attribute value for the target attribute
- Compare the pending export value against the CSO value
- Skip creating the
PendingExportAttributeValueChangeif values are identical
This would require passing the CSO (or its attribute values) into the method and adding comparison logic for each data type.
Impact
- Performance: Creates unnecessary database records and export cycles
- UX: Confusing display of pending exports that appear identical to current values
- Data integrity: No functional impact, but wastes resources
Related Files
JIM.Application/Servers/ExportEvaluationServer.cs-CreateAttributeValueChangesmethod