Query and summarize JIRA bugs for a specific project with counts by component
Generates summary statistics for JIRA bugs in a project, with counts by status, priority, and component.
/plugin marketplace add openshift-eng/ai-helpers/plugin install component-health@ai-helpers--project <project> [--component comp1 comp2 ...] [--status status1 status2 ...] [--include-closed] [--limit N]component-health:summarize-jiras
/component-health:summarize-jiras --project <project> [--component comp1 comp2 ...] [--status status1 status2 ...] [--include-closed] [--limit N]
The component-health:summarize-jiras command queries JIRA bugs for a specified project and generates summary statistics. It leverages the list-jiras command to fetch raw JIRA data and then calculates counts by status, priority, and component to help understand the bug backlog at a glance.
By default, the command includes:
This command is useful for:
Verify Prerequisites: Check that Python 3 is installed
python3 --versionVerify Environment Variables: Ensure JIRA authentication is configured
Check that the following environment variables are set:
JIRA_URL: Base URL for JIRA instance (e.g., "https://issues.redhat.com")JIRA_PERSONAL_TOKEN: Your JIRA bearer token or personal access tokenVerify with:
echo "JIRA_URL: ${JIRA_URL}"
echo "JIRA_PERSONAL_TOKEN: ${JIRA_PERSONAL_TOKEN:+***set***}"
If missing, guide the user to set them:
export JIRA_URL="https://issues.redhat.com"
export JIRA_PERSONAL_TOKEN="your-token-here"
Parse Arguments: Extract project key and optional filters from arguments
--project flag (e.g., "OCPBUGS", "OCPSTRAT")--component: Space-separated list of component search strings (fuzzy match)--status: Space-separated list of status values--include-closed: Flag to include closed bugs--limit: Maximum number of issues to fetch per component (default: 1000, max: 1000)Resolve Component Names (if component filter provided): Use fuzzy matching to find actual component names
python3 plugins/component-health/skills/list-components/list_components.py --release <release>
--component:
Execute Python Script: Run the summarize_jiras.py script for each component
plugins/component-health/skills/summarize-jiras/summarize_jiras.pylist_jiras.py to fetch raw datapython3 summarize_jiras.py --project <project> --component "<component>" [other args]Parse Output: Process the aggregated JSON response
total_count: Total matching issues in JIRAfetched_count: Number of issues actually fetchedsummary.by_status: Count of issues per statussummary.by_priority: Count of issues per prioritysummary.by_component: Count of issues per componentPresent Results: Display summary in a clear format
Error Handling: Handle common error scenarios
The command outputs a JIRA Bug Summary with the following information:
Overall Metrics:
By Status: Count of bugs in each status (includes recently closed)
| Status | Count |
|---|---|
| New | X |
| In Progress | X |
| Verified | X |
| Closed | X |
| ... | ... |
By Priority: Count of bugs by priority level
| Priority | Count |
|---|---|
| Critical | X |
| Major | X |
| Normal | X |
| Minor | X |
| Undefined | X |
By Component: Count of bugs per component
| Component | Count |
|---|---|
| kube-apiserver | X |
| Management Console | X |
| Networking | X |
| ... | ... |
For each component:
Summarize all open bugs for a project:
/component-health:summarize-jiras --project OCPBUGS
Fetches all open bugs in the OCPBUGS project (up to default limit of 1000) and displays summary statistics.
Filter by specific component:
/component-health:summarize-jiras --project OCPBUGS --component "kube-apiserver"
Shows bug counts for only the kube-apiserver component.
Filter by multiple components:
/component-health:summarize-jiras --project OCPBUGS --component "kube-apiserver" "etcd" "Networking"
Shows bug counts for kube-apiserver, etcd, and Networking components.
Include closed bugs:
/component-health:summarize-jiras --project OCPBUGS --include-closed --limit 500
Includes both open and closed bugs, fetching up to 500 issues.
Filter by status:
/component-health:summarize-jiras --project OCPBUGS --status New "In Progress" Verified
Shows only bugs in New, In Progress, or Verified status.
Combine multiple filters:
/component-health:summarize-jiras --project OCPBUGS --component "Management Console" --status New Assigned --limit 200
Shows bugs for Management Console component that are in New or Assigned status.
--project <project> (required): JIRA project key
Additional optional flags:
--component <search1> [search2 ...]: Filter by component names using fuzzy search
--status <status1> [status2 ...]: Filter by status values
New, "In Progress", Verified, Modified, ON_QA--include-closed: Include closed bugs in results
--limit <N>: Maximum number of issues to fetch per component
Python 3: Required to run the data fetching and summarization scripts
which python3JIRA Authentication: Environment variables must be configured
JIRA_URL: Your JIRA instance URLJIRA_PERSONAL_TOKEN: Your JIRA bearer token or personal access tokenHow to get a JIRA token:
Network Access: Must be able to reach your JIRA instance
/component-health:list-jiras to fetch raw dataplugins/component-health/skills/summarize-jiras/SKILL.mdplugins/component-health/skills/summarize-jiras/summarize_jiras.py/component-health:list-jiras (for raw JIRA data)/component-health:analyze