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.
- Loads the CSV (default:
~/Desktop/Jira_Backlog_AI_Realtor_Master.csv) and validates required columns:Issue Type,Epic,Summary,Description,Priority,Labels. - Creates all Epic rows first (Tasks need their parent Epic to already exist).
- Creates all Task rows, linking each one to its Epic:
- Tries the modern
parentfield first. - Falls back to the classic
Epic Linkcustom field if the Jira project rejectsparent(older company-managed projects).
- Tries the modern
- 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-duplicatesdisables this). - 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.
- Python 3.10+ (standard library only, nothing to
pip install) - A Jira Cloud API token: https://id.atlassian.com/manage-profile/security/api-tokens
- Your Jira project key (e.g.
SCRUM)
./create_jira_backlog.pyIt 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.
# 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| 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 |
- 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/--csvif your setup differs.
