Search in JQL

Create JQL filters and don't miss out on any information - no matter if it's in Jira or in HubSpot.

The custom JQL function allows the users to search through Jira work items and view HubSpot attributes, without switching between the tools. With relevant details available at hand, they can make well-informed decisions and avoid potential risks.

The custom JQL function can be used for two field types - HubSpot custom fields and User-type fields, such as Reporter, Assignee, etc. Below, an explanation is provided regarding the function syntax for both field types.

HubSpot custom fields

Custom JQL function syntax

field operator hubspotProperty(searchJQL)
  • field - a field that is operated by the function

    • here, only Issue fields are supported

  • operator - one of the supported JQL operators

    • available operators: in, not in

  • hubspotProperty - name of the custom function dedicated strictly to HubSpot custom fields

  • searchJQL - query in a format supported by the custom JQL

searchJQL syntax

"fieldName.propertyName operator propertyValue"
  • fieldName - HubSpot custom field name in Jira

    • Available formats of entry:

      • Numbers are the fieldID

        • HubSpot Contacts[24833]

        • HubSpot Contacts_24833

        • HubSpot Contacts

  • propertyName - attribute's name for a specific HubSpot object

    • Examples: . email, domain, country, firstName etc.

  • operator - operator in JQl format, used for HubSpot search

    • Available operators: =, !=, >=, <=, >, <, in, not in, ~, !~, is not, is

  • propertyValue - the value of an attribute for a HubSpot object, such as Mark, Germany etc.

Examples

Work item in hubspotProperty("HubSpot Contacts[24833].email ~ *@slothindustries.com")

The search will return all of Jira work items, where the HubSpot Contacts custom field lists users with defined in the query e-mail.

Work item not in hubspotProperty("HubSpot Contacts.country = Germany")

The search will return all of the Jira work items, where contacts listed in the HubSpot custom field are not from Germany.

User-type fields

Custom JQL function syntax

field operator hubspotWithProperty(searchJQL)
  • field - a field that is operated by the function

    • Here, the only field type supported is User, e.g. Reporter, Voter, Assignee etc.

  • operator - one of the supported JQL operators

    • Available operators: in, not in, is, is not, =, !=

  • hubspotWithProperty - the name of the function that is dedicated for User-type fields

  • searchJQL - query in a dedicated format for the custom JQL

searchJQL syntax

"objectType.propertyName operator propertyValue"
  • objectType - the name of a HubSpot object

    • Available objects: contacts

  • propertyName - the name of the object's attribute in HubSpot, e.g. email, domain, country, firstName etc.

  • operator - operator in the JQL format used for HubSpot search

    • Available operators: =, !=, >=, <=, >, <, in, not in, ~, !~, is not, is

  • propertyValue - the value for the HubSpot object's attribute, e.g. Kathrine, Ireland etc.

Examples

Reporter = hubspotWithProperty("contacts.email ~ *@greenbook.com")

The search will return HubSpot contacts, which are listed as Reporters and their e-mails belong to the same, defined domain.

Watcher = hubspotWithProperty("contacts.country !~ Ireland")

The search will return HubSpot contacts, which are defined as Watchers and they do not contain the information that they are from Ireland.

Troubleshooting guide

Any changes in HubSpot data should update automatically every hour. However, if the changes are still not visible in Jira, users can enforce the refresh by clicking Refresh precomputations. After reload, the details should be up-to-date.

Last updated

Was this helpful?