Skip to content

Instantly share code, notes, and snippets.

@jorinvo
Last active April 30, 2026 06:23
Show Gist options
  • Select an option

  • Save jorinvo/19e46c4cff110c437654607cd04084c2 to your computer and use it in GitHub Desktop.

Select an option

Save jorinvo/19e46c4cff110c437654607cd04084c2 to your computer and use it in GitHub Desktop.
Fusion Analysis Implemented with Shaper
select 'Fusion Issue Analysis'::section;
select open_issues as "Open Issues" from summary_kpis;
select closed_4w - opened_4w as "Net Flow" from summary_kpis;
select (pct_responded_48h / 100)::percent as "48h Response SLA" from summary_kpis;
select stale_count as "Stale Issues" from summary_kpis;
select 'Cumulative Issue Flow'::section;
select 'Weekly Opened vs Closed (non-cumulative)'::label;
select
week::xaxis,
value::barchart_stacked,
category::category
from (
select
week,
sum(opened) over (order by week) as opened,
sum(closed) over (order by week) as closed
from weekly_flow
)
unpivot (value for category in (opened, closed))
order by week;
select 'Open Issues by Category'::label;
SELECT col1::donutchart, col0::category
FROM (
VALUES
('bug', 165),
('enhancement', 113),
('other', 53),
);
select 'Velocity & Response'::section;
select 'Median Days to Close: Bugs vs Enhancements'::label;
select
week::xaxis,
issue_category::category,
median_days::linechart
from velocity order by week;
select 'Time to First Response (hours)'::label;
select
week::xaxis,
value::linechart,
percentile::category
from response_pctiles
unpivot (value for percentile in (p25, p50, p75))
order by week;
select 'Issue Distribution'::section;
select 'Open Issue Age by Type'::label;
select
age_bucket::xaxis,
issue_category::category,
issue_count::barchart_stacked
from (
select *, sum(issue_count) over (partition by age_bucket) as total
from age_distribution
)
order by total;
select 'Median Days to Close by Label'::label;
select
label_name::xaxis,
median_days_to_close::barchart,
closed_count as "# Closed Issues"
from close_by_label
order by median_days_to_close desc;
select 'Triage Health'::section;
select (pct_labeled / 100)::percent as "Have labels"
from triage_health;
select (pct_typed / 100)::percent as "Have type"
from triage_health;
select (pct_assigned / 100)::percent as "Are assigned"
from triage_health;
select (pct_milestoned / 100)::percent as "In a milestoned"
from triage_health;
select 'Workload & Priorities'::section;
select 'Open Issues by Assignee'::label;
select
assignee_login::yaxis,
value::barchart_stacked,
category::category
from (
select *, bugs + enhancements as total
from assignee_workload
)
unpivot (value for category in (bugs, enhancements))
order by total;
select 'search issues...'::input as search;
select 'filter by category'::label;
select issue_category::dropdown_multi as category_filter from community_priorities group by all order by all;
select 'Community Priorities'::label;
select
issue_number,
title,
issue_category,
reactions_total_count,
age_days
from community_priorities
where issue_category in getvariable('category_filter')
and title ilike concat('%', getvariable('search'), '%')
order by reactions_total_count desc;
select ''::section;
select 'Shaper implementation of the dashboard from:
https://github.com/dataders/fusion_issue_analysis
Dashboard SQL Code:
https://gist.github.com/jorinvo/19e46c4cff110c437654607cd04084c2
More about Shaper:
https://taleshape.com/shaper/docs';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment