How do I prevent duplicate issues from being created?

    Duplicate Prevention in Exalate Synchronization

    The Scale plan and above include the ability to link existing items, preventing duplicates when setting up synchronization between systems that already have related work items. This feature allows you to sync new items in bulk while establishing connections between existing work items without creating duplicates. By linking items before enabling automatic sync, you ensure Exalate recognizes existing relationships rather than treating them as new entities.

    Managing Initial Synchronization with if(firstSync)

    The if(firstSync) condition in your incoming sync scripts controls behavior during the initial synchronization. This conditional logic executes only when a work item syncs for the first time, allowing you to set up initial mappings like project assignment and issue type without affecting subsequent updates.
    Example script:

    if(firstSync) { issue.projectKey = 'PM05' // Other initial setup logic }

    This pattern ensures you configure initial properties without creating duplicates on later syncs.

    Preventing Duplicates with Proper Trigger Configuration

    Trigger configuration plays a crucial role in preventing duplicates by ensuring only appropriate items enter the sync queue. You can:

    • Configure automatic triggers to sync data based on specific conditions.

    Well-defined trigger rules prevent the same work item from being synced multiple times through different paths.

    Testing Duplicate Prevention with Test Run

    The Test Run functionality helps validate your duplicate prevention logic before deploying it to production. You can simulate synchronization with test cases to verify that:

    • Existing items won’t create duplicates.

    • Your firstSync logic behaves correctly.