A Python tool that generates professional Word documents for sprint reports by processing data from JIRA (via Atlassian CLI) or CSV files, combined with Excel metrics.
- Dual Data Sources: Automatically chooses between direct JIRA integration (ACLI) or CSV files downloaded directly from Jira
- Excel Metrics Integration: Processes historical sprint data from Excel files
- Professional Word Reports: Uses customizable Word templates with automated formatting
- Flexible Input: Command-line arguments or interactive prompts
- Robust Processing: Handles Word document text runs and placeholder replacement
- Python 3.x
- Virtual environment (recommended)
- Word template file:
end_of_sprint_report_template.docx - Excel metrics file:
sprint_metrics.xlsx - Logo image:
footer_logo.png - Either: CSV files with sprint data OR Atlassian CLI configured
- Clone or download the project
- Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate - Install required dependencies:
pip install pandas python-docx openpyxl
If you want to fetch data directly from JIRA:
# Install Atlassian CLI
# Authenticate with your JIRA instance
acli jira auth login --site "yoursite.atlassian.net" --email "your@email.com"
# Verify authentication
acli jira auth statuspython3 "sprint report script.py"CSV Mode:
python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024ACLI Mode (JIRA Integration):
python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024 --project MYPROJACLI Mode with Sprint ID:
python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024 --project MYPROJ --sprint-id 123Force CSV Mode:
python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024 --use-csvDebug Mode:
python3 "sprint report script.py" --debugSprint Report Script/
├── sprint report script.py # Main script
├── end_of_sprint_report_template.docx # Word template
├── sprint_metrics.xlsx # Historical metrics
├── footer_logo.png # Logo for reports
├── [CSV files] # Sprint deliverables (if using CSV mode)
└── venv/ # Virtual environment
Expected columns:
- Issue key
- Issue Type
- Summary
- Custom field (Story Points)
- Status
This data format is automatically produced when downloading the output of JQL from Jira.
Expected columns:
- release_sprint
- Goal Achieved?
- Story Points Planned
- Story Points completed
- Predictability
- Churn
- Spillover
- Sprint Complete?
{release_no}- Release number{sn}- Sprint number{sstart}- Sprint start date{sfinish}- Sprint finish date{now}- Current date
The script generates a Word document named:
OI{release_number}-S{sprint_number} - End of Sprint Report.docx
The script follows a modular workflow:
- Data Source Selection: Automatically chooses between ACLI or CSV
- Data Processing: Reads sprint deliverables and Excel metrics
- Template Processing: Loads Word template and replaces placeholders
- Table Generation: Creates formatted tables for deliverables, bugs, and metrics
- Document Generation: Saves the final formatted report
pandas- Data processing and CSV handlingpython-docx- Word document manipulationopenpyxl- Excel file processing
- Ensure all required files are in the project directory
- Verify ACLI authentication if using JIRA integration
- Check CSV file format matches expected columns
- Ensure virtual environment is activated before running