The Gtmhub Jira plugin integration for Jira Cloud and Jira Server / DC enables you to link Jira items to your Gtmhub OKRs by creating a corresponding Task in Gtmhub. When in Gtmhub, you can see which Jira items support your OKR, and see their current status. When in Jira, you can see which OKRs this item is linked to.
Sometimes you may want to pull a report of all Jira items that have been linked to Gtmhub OKRs via our plugin. In this article, you'll find some more context and sample JQL statements helping you achieve that.
JQL for Jira Server
When you add the Gtmhub plugin to a Jira Server instance, we add a custom field called GtmhubObjectID. This field holds the information for the link between the Jira item and Gtmhub item. If you want to query Jira items that have been linked, you must use the following JQL:
GtmhubObjectID is not EMPTY
This will pull all Jira items that have a link to a Gtmhub OKR. You may want to narrow down the JQL filter further depending on your use case (E.g. by Project, Epic, and so on)
JQL for Jira Cloud
When you add the Gtmhub plugin to a Jira Cloud instance, we add a new issue property. This property holds the following keys:
goalName (the name of the Gtmhub Objective)
goalId (the Id of the Gtmhub Objective)
goalOwnerName (the name of the Objective owner)
goalOwnerType (is it a team or a user)
All of the above are searchable keys, exposed as ‘text’ type in Jira. You can use the in a JQL statement like this:
1. To get all Jira issues liked to a Gtmhub OKR, you can use:
issue.property[gtmhub].goalName is not null
issue.property[gtmhub].goalId is not null
2. To get all Jira issue linked to a Gtmhub Objective called "Grow the business" use:
issue.property[gtmhub].goalName ~ 'Grow the business'
or you can use wildcards, too
issue.property[gtmhub].goalName ~ 'Grow*'
3. To get all Jira issue linked to a Gtmhub Objectives owned by John Smith use:
issue.property[gtmhub].goalOwnerName ~ 'John Smith'
or the ones assigned to the Engineering team in Gtmhub
issue.property[gtmhub].goalOwnerName ~ 'Engineering'
4. To get all Jira issues linked to Gtmhub OKRs that are owned by a team, and not by individual user use:
issue.property[gtmhub].goalOwnerType ~ 'team'
and, correspondingly, to get the ones like dot a Gtmhub OKR assigned to a user:
issue.property[gtmhub].goalOwnerType ~ 'user'