Sync Bridge for Jira Cloud

Search Synced Work Items with JQL

📘 What you will learn here

On this page you will learn how to find synced work items on This Jira site with JQL in Jira search, filters, dashboards and automation rules, using the search fields Sync Bridge adds and ready-made example queries.


How it works

  • The fields are stored on work items on This Jira site, the site where Sync Bridge is installed. Work items on the other Jira site don't get them.

  • A work item gets the fields the first time Sync Bridge works on it, or when someone uses the per-work-item sync switch on it. Work items Sync Bridge has never touched have no values, so sbHasSynced = "false" doesn't find them. Use sbHasSynced IS EMPTY for those.

  • The values are updated every time a sync starts, finishes, fails or is retried, when a work item is unlinked, and when someone turns a rule on or off for the work item. Jira can take a short time to reflect a change in search results.

  • Several fields hold rule IDs. To find a rule's ID, open the rule, turn on the API trigger on the Configuration tab, expand it and select View example request. The ID is the configId value.

Search fields

Field

Type

Value

sbHasFailure

Text, "true" or "false"

"true" if the latest sync failed for at least one rule.

sbHasSynced

Text, "true" or "false"

"true" if at least one rule has synced the work item successfully.

sbAnyManualOverrideOn

Text, "true" or "false"

"true" if someone has turned sync on for the work item for at least one rule with the per-work-item sync switch.

sbTargetKeys

List of text

Keys of the linked work items on the other site, for example CUST-42.

sbTargetProjects

List of text

Space keys of the linked work items on the other site, for example CUST.

sbRuleIds

List of text

IDs of every rule that has worked on the work item.

sbSyncedRuleIds

List of text

IDs of rules whose latest sync of the work item succeeded.

sbFailedRuleIds

List of text

IDs of rules whose latest sync of the work item failed.

sbEnabledRuleIds

List of text

IDs of rules someone has turned on for the work item with the per-work-item sync switch.

sbDisabledRuleIds

List of text

IDs of rules someone has turned off for the work item with the per-work-item sync switch.

sbSyncPairs

Full text

One entry per linked work item, in the form ruleId::status::linkedKey. The status is Pending, Syncing, Synced or Sync Failed. Search it with ~.

sbLastSyncedAt

Date

The most recent successful sync of the work item, across all rules.

Text fields use exact matching with =, != and IN. For list fields, a work item matches if any value in its list matches. sbEnabledRuleIds and sbDisabledRuleIds only record explicit choices: a work item that follows the rule's default isn't listed in either.

Example queries

To find

JQL

Work items with a failed sync

sbHasFailure = "true"

Work items with a failed sync in one space

project = ABC AND sbHasFailure = "true" ORDER BY updated DESC

All work items that have been synced

sbHasSynced = "true"

Work items Sync Bridge has never worked on

project = ABC AND sbHasSynced IS EMPTY

The work item linked to a work item on the other site

sbTargetKeys = "CUST-42"

Work items linked to several work items on the other site

sbTargetKeys IN ("CUST-42", "CUST-43")

Work items linked to a space on the other site

sbTargetProjects = "CUST"

Work items a rule has worked on

sbRuleIds = "<rule ID>"

Work items where a rule's latest sync failed

sbFailedRuleIds = "<rule ID>"

Work items where someone turned a rule off

sbDisabledRuleIds = "<rule ID>"

Work items where someone turned sync on

sbAnyManualOverrideOn = "true"

Work items synced in the last 7 days

sbLastSyncedAt >= -7d

Synced work items that haven't synced for 30 days

sbHasSynced = "true" AND sbLastSyncedAt < -30d

Work items currently waiting or syncing

sbSyncPairs ~ "Pending" OR sbSyncPairs ~ "Syncing"

Save a query as a filter and add it to a Jira dashboard to keep an eye on failed syncs. To see why a sync failed, open the work item's Sync Bridge panel or the admin Sync history page.