The fetcher.py script is a Python tool designed to fetch Jira issues from the Red Hat Jira instance (issues.redhat.com) and generate organized Markdown reports grouped by component.
- Fetches bugs from the PTL (Product Training and Learning) project
- Filters by component and priority level
- Supports pagination for large result sets
- Generates individual Markdown files per component
- Organizes outputs in timestamped directories
- Interactive prompts for authentication, components, and priorities
- Python 3.x
requestslibrary (pip install requests)- Valid Jira Personal Access Token (PAT)
python fetcher.pyThe script will guide you through three prompts:
=== Jira Bug Fetcher ===
Enter your Jira Personal Access Token (Bearer): [your-token-here]
Default components: CEPH125, CEPH130, CL110, CL210, CL260, CL310, RH066X, RH104, RH124, RH134, RH199, RH174, RH236, RH254, RH318, RH342, RH354, RH362, RH403, RH415, RH436, RH442, RHS429, CL170, CL270
Enter a comma-separated list of components (or press Enter to use default):
Options:
- Press Enter to use all default components
- Enter specific components:
RH124, RH134, RH199 - Enter any custom component list
Available priorities: Blocker, Critical, Major, Normal, Minor, Undefined
Default priorities: Blocker, Critical
(Type 'all' to select all priorities)
Enter a comma-separated list of priorities (or press Enter to use default):
Options:
- Press Enter to use default (Blocker, Critical)
- Type all to select all priority levels
- Enter specific priorities:
Blocker, Critical, Major
The script creates a directory structure:
JIRA_QUERIES/
└── YYMMDD-HHMMSS/
├── RH124.md
├── RH134.md
└── RH199.md
Where:
YYMMDD= Year, Month, Day (e.g., 260306 for March 6, 2026)HHMMSS= Hour, Minute, Second (e.g., 131454 for 1:14:54 PM)
Each Markdown file contains all issues for that specific component.
- Components: RH124, RH134, RH199
- Priorities: Blocker, Critical (default)
- Date: March 6, 2026 at 13:14:54
=== Jira Bug Fetcher ===
Enter your Jira Personal Access Token (Bearer): [token]
Default components: CEPH125, CEPH130, CL110, CL210, CL260, CL310, RH066X, RH104, RH124, RH134, RH199, ...
Enter a comma-separated list of components (or press Enter to use default): RH124, RH134, RH199
Available priorities: Blocker, Critical, Major, Normal, Minor, Undefined
Default priorities: Blocker, Critical
(Type 'all' to select all priorities)
Enter a comma-separated list of priorities (or press Enter to use default): [Enter]
Executing JQL query...
Successfully fetched 127 total issues.
Generating Markdown files...
-> Created JIRA_QUERIES/260306-131454/RH124.md (45 issues)
-> Created JIRA_QUERIES/260306-131454/RH134.md (62 issues)
-> Created JIRA_QUERIES/260306-131454/RH199.md (20 issues)
Done! Reports are saved in the 'JIRA_QUERIES/260306-131454' directory.
Once the Markdown files are generated, you can analyze them manually or use AI assistance.
Use this prompt with Claude or other AI tools to analyze the generated reports:
Analyze the Jira issues in the JIRA_QUERIES/260306-131454 directory.
Give me a summary of issues with obvious solutions.
The AI will review all Markdown files and provide:
-
Documentation/Content Errors
- Typos in commands or file paths
- Incorrect hostnames or URLs
- Date/version mismatches
- Missing or incorrect syntax
-
Lab Environment Issues
- Missing users or services
- Setup script problems
- Missing configuration commands
-
Instructional Issues
- Step numbering errors
- Solution misplacements
- Unclear instructions
Each identified issue includes:
- Jira ticket number and link
- Brief description of the problem
- Location (course, chapter, section)
- Recommended solution
To fetch only high-severity issues:
Enter priorities: Blocker
To fetch medium-to-high severity:
Enter priorities: Blocker, Critical, Major
To get a comprehensive view of all issues regardless of priority:
Enter priorities: all
To fetch issues for specific courses only:
Enter components: RH124, RH134
For Ceph-related components:
Enter components: CEPH125, CEPH130
The script constructs the following JQL query:
project = PTL
AND issuetype = Bug
AND component not in componentMatch(BFX0)
AND statusCategory != Done
AND component not in ("Video Content", Translations, "Learning Platform")
AND component in (RH124, RH134, RH199)
AND priority in (Blocker, Critical)
ORDER BY component desc
- Verify your Personal Access Token is valid
- Check token hasn't expired
- Ensure proper Bearer token format
- Verify components exist in the PTL project
- Check if there are open bugs for selected priorities
- Confirm network connectivity to issues.redhat.com
- Some components may have no issues matching the criteria
- Try expanding priority range (use 'all')
- Check component names are spelled correctly
- Start Broad: Use default settings first to see all available issues
- Refine Gradually: Use specific components and priorities for focused analysis
- Regular Updates: Run queries periodically to track new issues
- Archive Results: Keep timestamped directories for historical tracking
- Analyze Patterns: Use AI tools to identify common issue types across components
For issues with the script or suggestions for improvements:
- Check the script's error messages
- Verify Jira API connectivity
- Review the generated JQL query in the console output