Skip to content

magammon/Sprint-Report-Script

Repository files navigation

Sprint Report Script

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.

Features

  • 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

Prerequisites

  • 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

Installation

  1. Clone or download the project
  2. Create and activate a virtual environment:
    python3 -m venv venv
    source venv/bin/activate
  3. Install required dependencies:
    pip install pandas python-docx openpyxl

ACLI Setup (Optional - for JIRA Integration)

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 status

Usage

Interactive Mode (CSV)

python3 "sprint report script.py"

Command Line Arguments

CSV Mode:

python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024

ACLI Mode (JIRA Integration):

python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024 --project MYPROJ

ACLI 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 123

Force CSV Mode:

python3 "sprint report script.py" --release 12 --sprint 4 --start 01/01/2024 --finish 15/01/2024 --use-csv

Debug Mode:

python3 "sprint report script.py" --debug

File Structure

Sprint 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

Data Formats

CSV Input Format

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.

Excel Metrics Format (sprint_metrics.xlsx)

Expected columns:

  • release_sprint
  • Goal Achieved?
  • Story Points Planned
  • Story Points completed
  • Predictability
  • Churn
  • Spillover
  • Sprint Complete?

Word Template Placeholders

  • {release_no} - Release number
  • {sn} - Sprint number
  • {sstart} - Sprint start date
  • {sfinish} - Sprint finish date
  • {now} - Current date

Output

The script generates a Word document named: OI{release_number}-S{sprint_number} - End of Sprint Report.docx

Architecture

The script follows a modular workflow:

  1. Data Source Selection: Automatically chooses between ACLI or CSV
  2. Data Processing: Reads sprint deliverables and Excel metrics
  3. Template Processing: Loads Word template and replaces placeholders
  4. Table Generation: Creates formatted tables for deliverables, bugs, and metrics
  5. Document Generation: Saves the final formatted report

Dependencies

  • pandas - Data processing and CSV handling
  • python-docx - Word document manipulation
  • openpyxl - Excel file processing

Troubleshooting

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages