isUnderSync

    Signature

    Helper syncHelper
    Signature

    isUnderSync(entityId: String, entityType: String)

    isUnderSync(entityId: String, entityType: String, connection: String)

    isIssueUnderSync(entityId: String)

    isIssueUnderSync(entityId: Long)

    Description

    Allows to check if certain entities are synced through a specific connection

    Introduced in 5.1.0

    With Exalate, you can 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

    Variable Description
    issue.id Issue, ticket, or entity id you want to check
    entityType Issue, ticket, or entity type you want to check
    B_to_A Connection 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.";}