Skip to content

Repository files navigation

Jira Backlog CSV Importer

create_jira_backlog.py reads a CSV of Epics and Tasks and creates them in Jira Cloud via the REST API. It's a single, dependency-free Python script — no packages to install.

What it does

  1. Loads the CSV (default: ~/Desktop/Jira_Backlog_AI_Realtor_Master.csv) and validates required columns: Issue Type, Epic, Summary, Description, Priority, Labels.
  2. Creates all Epic rows first (Tasks need their parent Epic to already exist).
  3. Creates all Task rows, linking each one to its Epic:
    • Tries the modern parent field first.
    • Falls back to the classic Epic Link custom field if the Jira project rejects parent (older company-managed projects).
  4. Skips creating duplicates: before creating an issue it searches for an existing Epic/Task with the same summary and issue type, and reuses it if found (--allow-duplicates disables this).
  5. Writes a results report (jira_import_results_<timestamp>.json) and, if anything failed, a failures CSV (jira_import_failures_<timestamp>.csv) in the current directory.

Requirements

Running it

./create_jira_backlog.py

It will prompt for the three credentials it needs (or read them from environment variables if set):

Prompt Env var
Jira Email JIRA_EMAIL
Jira API Token JIRA_API_TOKEN
Jira Project Key JIRA_PROJECT_KEY

The API token is entered with getpass, so it is never echoed to the terminal.

Example run

Running create_jira_backlog.py in the terminal

Useful flags

# Point at a different CSV file
./create_jira_backlog.py --csv /path/to/other_backlog.csv

# Point at a different Jira site
./create_jira_backlog.py --domain https://your-site.atlassian.net

# Preview what would be created, without calling the create API
./create_jira_backlog.py --dry-run

# Always create new issues instead of reusing matches by summary
./create_jira_backlog.py --allow-duplicates

CSV format

Column Required Notes
Issue Type Yes Epic or Task (case-insensitive)
Epic Tasks only Must match an Epic's Summary in this CSV, or an existing Epic already in Jira
Summary Yes Issue title
Description No Converted to Jira's rich-text (ADF) format
Priority No Must match a priority name that exists in your Jira project
Labels No Comma or semicolon separated; spaces in each label are converted to hyphens

Notes

  • Safe to re-run: existing Epics/Tasks with a matching summary are reused rather than duplicated.
  • The domain and CSV path both default to values in the script (DEFAULT_DOMAIN, DEFAULT_CSV) — override with --domain / --csv if your setup differs.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages