Query and summarize JIRA bugs for a specific project with counts by component
/plugin marketplace add openshift-eng/ai-helpers/plugin install component-health@ai-helpersThis skill inherits all available tools. When active, it can use any tool Claude has access to.
summarize_jiras.pyThis skill provides functionality to query JIRA bugs for a specified project and generate summary statistics. It leverages the list-jiras skill to fetch raw JIRA data, then calculates counts by status, priority, and component to provide insights into the bug backlog.
Use this skill when you need to:
Python 3 Installation
which python3JIRA Authentication
JIRA_URL: Base URL for JIRA instance (e.g., "https://issues.redhat.com")JIRA_PERSONAL_TOKEN: Your JIRA bearer token or personal access tokenNetwork Access
First, ensure Python 3 is available:
python3 --version
If Python 3 is not installed, guide the user through installation for their platform.
Check that required environment variables are set:
# Verify JIRA credentials are configured
echo "JIRA_URL: ${JIRA_URL}"
echo "JIRA_PERSONAL_TOKEN: ${JIRA_PERSONAL_TOKEN:+***set***}"
If any are missing, guide the user to set them:
export JIRA_URL="https://issues.redhat.com"
export JIRA_PERSONAL_TOKEN="your-token-here"
The script is located at:
plugins/component-health/skills/summarize-jiras/summarize_jiras.py
Execute the script with appropriate arguments:
# Basic usage - summarize all open bugs in a project
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS
# Filter by component
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--component "kube-apiserver"
# Filter by multiple components
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--component "kube-apiserver" "Management Console"
# Include closed bugs
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--include-closed
# Filter by status
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--status New "In Progress"
# Set maximum results limit (default 100)
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--limit 500
The script outputs JSON data with the following structure:
{
"project": "OCPBUGS",
"total_count": 1500,
"fetched_count": 100,
"query": "project = OCPBUGS AND (status != Closed OR (status = Closed AND resolved >= \"2025-10-11\"))",
"filters": {
"components": null,
"statuses": null,
"include_closed": false,
"limit": 100
},
"summary": {
"total": 100,
"opened_last_30_days": 15,
"closed_last_30_days": 8,
"by_status": {
"New": 35,
"In Progress": 25,
"Verified": 20,
"Modified": 15,
"ON_QA": 5,
"Closed": 8
},
"by_priority": {
"Normal": 50,
"Major": 30,
"Minor": 12,
"Critical": 5,
"Undefined": 3
},
"by_component": {
"kube-apiserver": 25,
"Management Console": 30,
"Networking": 20,
"etcd": 15,
"No Component": 10
}
},
"components": {
"kube-apiserver": {
"total": 25,
"opened_last_30_days": 4,
"closed_last_30_days": 2,
"by_status": {
"New": 10,
"In Progress": 8,
"Verified": 5,
"Modified": 2,
"Closed": 2
},
"by_priority": {
"Major": 12,
"Normal": 10,
"Minor": 2,
"Critical": 1
}
},
"Management Console": {
"total": 30,
"opened_last_30_days": 6,
"closed_last_30_days": 3,
"by_status": {
"New": 12,
"In Progress": 10,
"Verified": 6,
"Modified": 2,
"Closed": 3
},
"by_priority": {
"Normal": 18,
"Major": 8,
"Minor": 3,
"Critical": 1
}
},
"etcd": {
"total": 15,
"opened_last_30_days": 3,
"closed_last_30_days": 2,
"by_status": {
"New": 8,
"In Progress": 4,
"Verified": 3,
"Closed": 2
},
"by_priority": {
"Normal": 10,
"Major": 4,
"Critical": 1
}
}
},
"note": "Showing first 100 of 1500 total results. Increase --limit for more accurate statistics."
}
Field Descriptions:
project: The JIRA project queriedtotal_count: Total number of matching issues (from JIRA search results)fetched_count: Number of issues actually fetched (limited by --limit parameter)query: The JQL query executed (includes filter for recently closed bugs)filters: Applied filters (components, statuses, include_closed, limit)summary: Overall statistics across all fetched issues
total: Count of fetched issues (same as fetched_count)opened_last_30_days: Number of issues created in the last 30 daysclosed_last_30_days: Number of issues closed/resolved in the last 30 daysby_status: Count of issues per status (includes recently closed issues)by_priority: Count of issues per priorityby_component: Count of issues per component (note: issues can have multiple components)components: Per-component breakdown with individual summaries
total: Number of issues assigned to this componentopened_last_30_days: Number of issues created in the last 30 days for this componentclosed_last_30_days: Number of issues closed in the last 30 days for this componentby_status: Status distribution for this componentby_priority: Priority distribution for this componentnote: Informational message if results are truncatedImportant Notes:
--limit)total_count represents all matching issues in JIRA--limit parameteropened_last_30_days and closed_last_30_days help track recent bug flow and velocityBased on the summary data:
Authentication Errors
Network Errors
URLError or connection timeoutInvalid Project
Missing Environment Variables
Rate Limiting
Enable verbose output by examining stderr:
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS 2>&1 | tee debug.log
--project: JIRA project key to query
--component: Filter by component names
--component "kube-apiserver" "Management Console"--status: Filter by status values
--status New "In Progress" Verified--include-closed: Include closed bugs in the results
--limit: Maximum number of issues to fetch
The script outputs JSON with summary statistics and per-component breakdowns:
{
"project": "OCPBUGS",
"total_count": 5430,
"fetched_count": 100,
"query": "project = OCPBUGS AND (status != Closed OR (status = Closed AND resolved >= \"2025-10-11\"))",
"filters": {
"components": null,
"statuses": null,
"include_closed": false,
"limit": 100
},
"summary": {
"total": 100,
"opened_last_30_days": 15,
"closed_last_30_days": 8,
"by_status": {
"New": 1250,
"In Progress": 800,
"Verified": 650
},
"by_priority": {
"Critical": 50,
"Major": 450,
"Normal": 2100
},
"by_component": {
"kube-apiserver": 146,
"Management Console": 392
}
},
"components": {
"kube-apiserver": {
"total": 146,
"opened_last_30_days": 20,
"closed_last_30_days": 12,
"by_status": {...},
"by_priority": {...}
}
},
"note": "Showing first 100 of 5430 total results. Increase --limit for more accurate statistics."
}
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS
Expected Output: JSON containing summary statistics of all open bugs in OCPBUGS project
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--component "kube-apiserver"
Expected Output: JSON containing summary for the kube-apiserver component only
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--include-closed \
--limit 500
Expected Output: JSON containing summary of both open and closed bugs (up to 500 issues)
python3 plugins/component-health/skills/summarize-jiras/summarize_jiras.py \
--project OCPBUGS \
--component "kube-apiserver" "etcd" "Networking"
Expected Output: JSON containing summary for specified components
This skill is designed to:
list-jiras skill for raw data fetchinglist-jiras: Fetch raw JIRA issue datalist-regressions: Fetch regression data for releasesanalyze-regressions: Grade component health based on regressionsget-release-dates: Fetch OpenShift release dateslist_jiras.py to fetch raw data/component-health:list-jiras insteadUse when working with Payload CMS projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.