I have existing Jira Epic issues. 211 to be exact. I have defined the relationships between them in a google sheets document that i can export as a csv. I have two columns. Column A contains the "parent" and column B contains the "child" values are issueID-is.
Can and how i can use this CSV file to link all of these issues to each other. There are over 700 links that need to be made and I tried doing this in batches of 240. Import csv also requires a summary, i placed a dummy value in there since I am not creating any new issues. Just trying to link existing Epic-s to each other.
When I try to do this, it gives me warnings. That some issues were not found. But i checked and all the issueID-s actually exist. So is there antoher/better way to go about this or is this even possible?
If i look at the detailided validation........ it tries to create new issues. But i already have all these issues. Can they be linked togheter?
Do you want to achieve a parent - child relation or an issue link relation?
Issue Id is for parent child relation and blocks is for an issue link relation.
For parent child relation, you need 3 columns in your csv, issue id, issue type and parent.
Also see the KB article on CSV import; import-data-from-a-csv-file
Issue linking is done different, see; how-to-import-issue-links-from-a-csv-file-in-jira (the article says server/dc only, but the same applies for Cloud).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the kb article: how-to-import-issue-links-from-a-csv-file-in-jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think this is the right answer, but if it doesn't work because of the summary field requirement you can always roll your own with the issue link API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If go with the "how to import isse links from a csv file in jira" it creates new issues. My problem is that the issues already exist. And existing issues need to be linked
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK. This is quick-and-dirty, but this Python will read from a CSV file and link the issues in the abovementioned columns. You'll need to make changes to your own domain name and authentication.
import csv
import json
import requests
jira_api = requests.Session()
jira_api.headers.update({"Accept": "application/json", "Content-Type": "application/json"})
jira_api.auth = ("email", "api_token")
atlassian_domain = "your-domain.atlassian.net"
def link_issue(inward, outward, link_type="Blocks"):
response = jira_api.request(
"POST",
f"https://{atlassian_domain}/rest/api/2/issueLink",
data=json.dumps(
{
"inwardIssue": {"key": inward},
"outwardIssue": {"key": outward},
"type": {"name": link_type},
}
)
)
response.raise_for_status()
with open("links.csv") as links_csv:
reader = csv.DictReader(links_csv)
for line in reader:
link_issue(line["IssueId"], line["Blocks"])
print(f"{line["IssueId"]} > {line["Blocks"]}")
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.