How to Check if Entities are Synced

    Exalate allows you to create multiple connections. To keep track of your syncs, you can check if certain entities are synced through a specific connection. In Exalate, this can be done with the isUnderSync and isIssueUnderSync functions. This article shows how you can check if entities are synced.

    Script Variables

    VariableDescription
    issue.idThe issue, ticket, or entity id you want to check
    entityTypeIssue, ticket, or entity type you want to check
    B_to_AConnection name you want to check

    return

    Stops sync if an issue is already synced in a connection

    Script Examples

    With these example scripts, you can check if an entity is synced through the same or another connection. You can also stop sync by adding a return variable. These examples can be used in the outgoing sync.

    This script stops sync if an entity with an entity id and an entity type is synced through the same connection.

    if (syncHelper.isUnderSync(issue.id, entityType)){return;}

    This script stops sync if an entity with an entity id is synced through the same connection.

    if (syncHelper.isIssueUnderSync(issue.id)){return;}

    This script stops sync if an entity with a long entity id is synced through the same connection.

    if (syncHelper.isIssueUnderSync(issue.id.toLong())){return;}

    This script stops sync if an entity with an entity id and entity type is synced through a connection "B_to_A".

    if (syncHelper.isUnderSync(issue.id, entityType, "B_to_A")){return;}

    This script updates the entity description if an entity is synced through a connection "B_to_A".

    if (syncHelper.isUnderSync(issue.id, entityType, "B_to_A")){issue.description = "It's also under sync with B_to_A.";}

    Have more questions? Ask the community