Skip to content

Add resolution time metrics by priority level#299

Merged
redreceipt merged 3 commits intomainfrom
claude/add-resolution-time-metric-2flOM
Apr 22, 2026
Merged

Add resolution time metrics by priority level#299
redreceipt merged 3 commits intomainfrom
claude/add-resolution-time-metric-2flOM

Conversation

@redreceipt
Copy link
Copy Markdown
Member

Summary

This PR adds a new dashboard widget that displays average and p95 resolution times for completed issues, broken down by priority level. This provides visibility into how quickly issues at different priority levels are being resolved.

Key Changes

  • New function by_priority() in linear/issues.py: Groups issues by their priority level
  • New function get_resolution_time_by_priority() in linear/issues.py: Calculates average and p95 resolution times (in days) for each priority level, only including issues with both creation and completion timestamps
  • Priority labels mapping: Added PRIORITY_LABELS constant to map numeric priority values (1-5) to human-readable labels (Urgent, High, Medium, Low, Very Low)
  • New route /partials/index/resolution-by-priority in app.py: Serves the resolution metrics widget with configurable time window (default 30 days)
  • New context builder _build_resolution_by_priority_context(): Fetches completed bugs, features, and technical changes, filters for non-project items, and calculates resolution statistics
  • New template index_resolution_by_priority.html: Displays resolution stats in a grid layout showing priority label, average resolution time, issue count, and p95 metric
  • Updated index.html: Integrated the new widget into the dashboard with dynamic loading

Implementation Details

  • Only non-project issues are included in the metrics (filtered by issue.get("project"))
  • Priorities with no resolved issues in the time window are omitted from results
  • Uses existing get_time_data() utility to calculate lead time statistics
  • Respects the same caching and threading patterns as other dashboard widgets
  • Gracefully handles missing priority values and displays fallback labels (e.g., "P6" for unknown priorities)

https://claude.ai/code/session_014XrrEqCFFWBGuwkw5M7A6q

Breaks down average (and p95) resolution time across non-project
completed issues (Bugs, New Features, Technical Changes) grouped by
Linear priority so urgent work can be compared against lower-priority
items at a glance.

https://claude.ai/code/session_014XrrEqCFFWBGuwkw5M7A6q
@redreceipt redreceipt temporarily deployed to bug-board-claude-add-re-jug8fb April 22, 2026 13:51 Inactive
@redreceipt redreceipt temporarily deployed to bug-board-claude-add-re-jug8fb April 22, 2026 14:09 Inactive
The Linear label was renamed, so update every query site plus the
matching local variable names in app.py and jobs.py. The "New Features"
heading in the weekly changelog prose stays — it's a category label
for the LLM-generated summary, not a Linear label.

Also narrow resolution-by-priority to Bug + Feature Request only
(dropping Technical Change) so the home-page metric reflects the two
user-facing item types.

https://claude.ai/code/session_014XrrEqCFFWBGuwkw5M7A6q
@redreceipt redreceipt temporarily deployed to bug-board-claude-add-re-jug8fb April 22, 2026 14:15 Inactive
@redreceipt redreceipt merged commit c00bc00 into main Apr 22, 2026
8 checks passed
@redreceipt redreceipt deleted the claude/add-resolution-time-metric-2flOM branch April 22, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants