How to create dummy Jira projects and issues in bulk via a Python script
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Sometimes, Jira admins may want to create dummy Jira projects and issues. There are a couple of ways to do this. One is using scripting. You can find a Python script to create a customized number of Jira projects and issues.
Solution
Resolution
Download the create_issue_project.py script and upload it to one of the Jira nodes or to your computer.
You need to Download and install Python on the server/computer where you run this script.
Execute the command below:
1
python create_issue_project.py
This is the script output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Project created: Dummy Project 1 (Key: DUMMY1)
Project created: Dummy Project 2 (Key: DUMMY2)
Project created: Dummy Project 3 (Key: DUMMY3)
Project created: Dummy Project 4 (Key: DUMMY4)
Project created: Dummy Project 5 (Key: DUMMY5)
Project created: Dummy Project 6 (Key: DUMMY6)
Project created: Dummy Project 7 (Key: DUMMY7)
Project created: Dummy Project 8 (Key: DUMMY8)
Project created: Dummy Project 9 (Key: DUMMY9)
Project created: Dummy Project 10 (Key: DUMMY10)
Issue created in project DUMMY1: DUMMY1-1
Issue created in project DUMMY1: DUMMY1-2
Issue created in project DUMMY1: DUMMY1-3
Issue created in project DUMMY1: DUMMY1-4
Issue created in project DUMMY1: DUMMY1-5
Issue created in project DUMMY1: DUMMY1-6
Issue created in project DUMMY1: DUMMY1-7
...
...
...
Details
You need to change some parameters in the script based on your needs:
Change the number based on the number of issues and projects:
1 2
for i in range(1, 11): # Create 10 projects for i in range(1, 101): # Loop to create 100 issues for each issue type
Change Jira URL:
1
jira_url = 'http://localhost:8080'
Change username and password with a proper one:
1 2
username = 'admin' api_token = 'test'
Issue Type IDs:
1 2 3 4
issue_types = { "Bug": "10004", # Replace with actual ID from your instance "Epic": "10001", # Replace with actual ID from your instance "Story": "10002" # Replace with actual ID from your instance
ℹ️ You can navigate to Administration > Issues and check each issue type ID. If you hover your mouse over Edit, it will appear at the bottom of the page.
Was this helpful?