Skip to main content

JQL Calculator for Jira

Turn JQL into KPIs — calculate ratios, percentages, and metrics from two JQL queries on your dashboard.

Overview

Every team tracks metrics: defect rates, resolution percentages, sprint completion ratios. But Jira dashboards don't natively support math between two JQL queries. JQL Calculator fills that gap with a single, focused dashboard gadget.

How It Works

  1. Add the gadget to any Jira dashboard
  2. Enter two JQL queries — Query A (numerator) and Query B (denominator)
  3. Pick a math operation — divide, percentage, subtract, sum, multiply, or ratio
  4. See your KPI — displayed as a large, prominent number with optional color thresholds

Features

  • Six math operations — Divide, subtract, sum, multiply, percentage, and ratio
  • Color thresholds — Green, yellow, red based on configurable breakpoints
  • Flexible formatting — Number, percentage, decimal, ratio with custom prefix/suffix
  • JQL validation — Test each query before saving with instant issue counts
  • Lightweight & fast — Uses the Jira count API, sub-second response times
  • Runs on Forge — 100% serverless on Atlassian's infrastructure

Use Cases

Defect Rate

Query A: project = PROJ AND type = Bug AND status = Open
Query B: project = PROJ
Operation: Percentage → 12.5% open defects

Sprint Completion

Query A: sprint = "Sprint 42" AND status = Done
Query B: sprint = "Sprint 42"
Operation: Percentage → 87% complete

SLA Compliance

Query A: project = SUP AND resolved AND resolution = "Within SLA"
Query B: project = SUP AND resolved
Operation: Percentage → 94.2% within SLA

Open / Closed Ratio

Query A: project = PROJ AND status = Open
Query B: project = PROJ AND status = Done
Operation: Ratio → 0.3:1

Configuration

Math Operations

OperationDescriptionExample
DivideA / B50 / 200 = 0.25
Percentage(A / B) × 10050 / 200 = 25%
SubtractA - B200 - 50 = 150
SumA + B200 + 50 = 250
MultiplyA × B200 × 50 = 10,000
RatioA : B50 : 200 = 0.25:1

Color Thresholds

Set green, amber, and red thresholds so KPIs change color automatically. Spot problems at a glance without reading numbers.

Number Formatting

Configure decimal places, add prefix or suffix text. Display results as 95%, $1,234, 3.5x — whatever your KPI needs.

Frequently Asked Questions

Does it count issues or sum field values?

JQL Calculator counts the number of issues matching each query. It does not sum custom field values (e.g., story points). If you need to calculate a percentage of issues with a certain status, this is the right tool. For field-level aggregation, consider a report add-on.

Can I use it with Jira Service Management?

Yes. JQL Calculator works with any issue type in Jira Cloud, including JSM request types. As long as you can write a JQL query that matches the issues, the gadget will count them. This makes it useful for SLA compliance dashboards and ticket resolution rates.

What happens if my JQL returns 0 issues?

If Query B (denominator) returns 0, the gadget displays "N/A" instead of attempting a division by zero. If Query A returns 0, the result is simply 0 (or 0% for percentage operations).

How often does it refresh?

The gadget refreshes each time the dashboard is loaded and can be manually refreshed. It uses Jira's issue count API, which returns results in sub-second time even for large instances.

Can I add multiple JQL Calculator gadgets to one dashboard?

Yes. Each gadget is independent with its own pair of JQL queries and operation. You can create a KPI dashboard with multiple calculators showing different metrics side by side.

Troubleshooting

ProblemCauseSolution
Result shows "N/A"Query B returned 0 issues (division by zero)Check your denominator JQL — it may be too restrictive or have a syntax error
JQL validation failsInvalid JQL syntaxUse the "Test" button to preview each query. Common issues: missing quotes around sprint names, wrong field names
Color thresholds not workingThresholds may be set in the wrong orderFor percentage, set green > amber > red (e.g., green ≥ 90, amber ≥ 70, red < 70). Verify the direction matches your metric.
Gadget shows old dataDashboard cacheRefresh the dashboard page. The gadget always fetches live data from Jira on load.
Permission errorUser can't access issues in the JQL scopeThe gadget runs as the viewing user. Ensure they have "Browse Projects" permission for all projects in the JQL queries.

Data Security & Privacy

Data storageNo data stored outside Atlassian
Data processingNo data processed outside Atlassian
Data residencyExclusively within Atlassian apps and services
GDPRData processor — issue metadata (issue counts from JQL results)
Security contactsupport@alpinate.com