Skip to content

Bug: Export evaluation creates pending exports even when CSO already has the same value #244

@JayVDZ

Description

@JayVDZ

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

  1. AD has User A with displayName = "Elliot Davies"
  2. JIM imports → CSO has displayName = "Elliot Davies"
  3. JIM syncs → MVO gets displayName = "Elliot Davies" (this registers as a 'change' to the MVO)
  4. Export evaluation → Creates pending export for displayName = "Elliot Davies"
  5. 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:

  1. Load the existing CSO attribute value for the target attribute
  2. Compare the pending export value against the CSO value
  3. Skip creating the PendingExportAttributeValueChange if 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 - CreateAttributeValueChanges method

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions