Dashboard gadget: charts, tables and KPI tiles

Description

Context

The Approval Path dashboard gadget could only render a paged list of approvals. Customers asking "how long do approvals take?", "who is the bottleneck?", "are we hitting our deadlines?" had to export and pivot the data themselves.

This work turns the single gadget into a configurable reporting gadget: the same source filters, six output types, and measures beyond a plain count — served by a dedicated server-side aggregation layer instead of paging rows into the browser.

Scope

Gadget typesTable (existing), Aggregated table, Pie chart, Bar chart, Line chart, KPI stat tile, chosen in the Gadget type field. Switching type sanitizes the configuration, keeping what still applies and clearing what conflicts.

Dimensions (Chart by / Group by) — Status, Priority, Approval name, Definition, Originator, Approver, Current step, Created, Decision deadline, Validity expiration, Resolved. Group by gives a second axis on bar, line, and aggregated tables (grouped / stacked / 100% stacked). Combination rules enforced in the UI and re-validated on the server: the two dimensions must differ, two date dimensions cannot be combined, and Approver + Current step cannot be combined. Date dimensions are bucketed by Granularity (Day/Week/Month/Quarter/Year) in the viewer's time zone.

Measures and aggregation — Approvals (count), Time to resolution, Age, Lateness, On time rate, Approval rate, Rejection rate. Duration measures support Average / Median / 90th percentile / Min / Max / Sum; counts and rates are counted. Approvals that cannot be measured are excluded and reported in a footnote (Based on 42 of 60 approvals (18 not yet resolved)). Pie charts accept only summable measures.

Per-type display configuration — pie (Other-folding, max slices, percentages on chart / in legend / off, donut total, slice labels), bar (orientation, value labels, axis labels and max), line (line style, markers, area fill, trend line, goal line, dual value axis, missing-interval handling, axis-label density), aggregated table (count 1D/2D pivot with total row / row totals / percentage column / empty-cell display / conditional formatting, or items mode with work-item chips and an approver popover), KPI tile (caption, period and period-by field, comparison against previous period or a static target, delta form, trend direction).

Value list / legend — configurable heading, count and percent labels, number column, total row, row limit with Show more, and compact number formatting.

Colors and labels — new admin page Settings → Charts holding a 20-slot site palette with Reset to Atlassian defaults; per-gadget color overrides, label overrides, and drag-to-reorder custom ordering on the Format tab. Status buckets keep their semantic colors.

Drill-downEnable hyperlinks makes slices, bars, points, legend rows, table rows, table cells, and the KPI tile open the Approvals list in a new tab with the gadget's filters plus the clicked bucket (both dimensions for a cell or stack segment). The Approvals list renders the new criteria as removable chips (originator, date range, empty field, exact name). Current step and the Other bucket are intentionally not drillable.

Editing experience — live preview beside the configuration form (stacked on narrow dashboards), draft persistence across reloads, Save blocked until a Chart bydimension is chosen.

Auto-refresh — Off / 5 / 15 (default) / 30 / 60 minutes.

Out of scope

  • Confluence: the gadget remains a Jira dashboard gadget. (The Settings → Charts palette page is reachable in both products.)

  • Export from chart types — export stays a Table feature.

Permissions

  • Jira admins aggregate across the whole site; everyone else is restricted to their personal scope.

  • The Approver dimension is admin-only: hidden in the picker for non-admins and forced empty server-side, so a shared dashboard cannot leak approver distribution to a non-admin viewer.

  • Item chips in items mode only link work items the viewer can actually load; unavailable items are counted as "not shown" rather than rendered.

Performance

  • Aggregation happens in SQL (top-K, grouped cells, date buckets) with a query timeout; no row-by-row fetching into the browser.

  • Results are cached server-side for 5 minutes.

  • Hard caps: 50 categories, 400 date buckets, 12 series, 50 rows and 50 items per row in items mode, 5 approvers per item popover, 200 value-list rows, 20 palette colors. Past the cap the remainder is folded into an Other bucket where the measure allows it (grouped axes always, single-dimension charts for counts and sums); date-axis and items truncation add a Showing only … footnote.

Acceptance criteria

  1. All six gadget types can be configured, saved, reopened, and rendered on a Jira dashboard.

  2. Every Chart by × Group by combination either renders correctly or is prevented by the documented rules; invalid combinations sent directly to the API are rejected.

  3. Each measure counts only the approvals it applies to, and the exclusion footnote reports the remainder.

  4. A non-admin viewer sees only their own approvals, and sees an empty result for an Approver-based gadget.

  5. Date buckets follow the viewer's time zone, not the server's or the author's.

  6. Drill-down lands on the Approvals list filtered to exactly the clicked bucket, with the extra criteria shown as removable chips.

  7. Site palette changes apply to all charts; per-gadget color overrides win over the palette; Reset to Atlassian defaults and Reset all colors restore defaults.

  8. Auto-refresh fires at the configured interval, and no interval keeps a stale chart beyond the 5-minute cache plus that interval.