Skip to main content
All CollectionsIntegrationsData Source: SaaS
Automate KR progress based on items linked through the Quantive Results plugin for Jira
Automate KR progress based on items linked through the Quantive Results plugin for Jira

Learn how to set up automatic Key Results based on the Tasks you create for Jira items using the Quantive Results plugin for Jira

Neli Ivanova avatar
Written by Neli Ivanova
Updated over a year ago

Overview

Quantive Results enables you to integrate with Jira in two ways. You can install the Quantive Results plugin for Jira Cloud or Server to link Jira issues to Quantive Results Objectives in the form of Tasks. You can also sync Jira data to Quantive Results and build powerful insights and automate your KRs. Check out this article to learn more about the use cases supported by these integrations.

If you want to query different Jira data and build complex insights, the recommended way is to sync your Jira data in Quantive Results. In some scenarios, you might want to automate your KR progress based just on the status of the Jira items you've linked to a Quantive Results Objective. Since this linking actually creates a corresponding Task under the specified Objective, you can actually use the Quantive Results Data Source to create your insights and automate your KRs. This article explains how to achieve this.

Create an insight using Quantive Results Tasks

Each Quantive Results account comes with a default data source called Quantive Results. This data source pulls data from your Quantive Results account and makes it available so you can build insights against it. It also powers the default Performance and Process reports (which are also insights, by the way). To see what data is available in your Quantive Results data source, check out Reference: Quantive Results data source. To build an insight based on the linked Jira items, we'll be using the quantiveresultstasks and quantiveresultsgoals entities.

The Quantive Results data source has an entity called quantiveresultstasks – it contains all Tasks in your account. Each Task has a field that indicates its status, its parent OKR (if one is selected) and if it comes from an external system, which external system it comes from (in this case Jira)

This way, you can build an SQL insight against the quantiveresultstasks table and apply some logic that calculates the ratio between the number of Jira-linked Tasks in a certain status over the total number of Jira-linked Tasks under that Objective. To find the Objective Id, you will need to query the quantiveresultsgoals entity, which contains all Objectives in your account. Here’s a sample:

SELECT

CASE WHEN all_tasks = 0 THEN 0

ELSE

100*tasks_status_table.cmpl_tasks/tasks_status_table.all_tasks END AS progress

FROM

( SELECT

COUNT(id) AS all_tasks,

COUNT(1) FILTER (WHERE status = 'Done') as cmpl_tasks

FROM quantiveresultstasks -- this is the table that holds all Tasks in your account

WHERE parentId IN --This is the ID of the Goal the tasks lives under. Can be replaced with dynamic filter

(

SELECT id FROM quantiveresultsgoals -- This table holds all Objectives

WHERE name = 'Seamless API integrations'

)

AND externalsystem = 'jira' -- tasks linked through the Jira plugin have this field set to 'jira'

) AS tasks_status_table

Additional information

Note that the above scenario is possible since you linked these items as Quantive Results Tasks using the Jira plugin. If you wanted to abstract from what you’re linking as Tasks in Quantive Results, and have other Jira content dynamically power your KR numbers, then you will need to sync the Jira data using the Jira Integration approach. This way you can build your insights directly against the Jira info that will be available to you as a result of this integration.

Did this answer your question?