Hi,
I want to export a list of tickets from a JIRA instance and import them in another JIRA instance. I have tried saving tickets in a CSV file and importing the CSV fil. It effectively import the tickets but not their attachements. Is there a way to import all tickets + attachments in JIRA.
Regards,
Julien
Community moderators have prevented the ability to post new answers.
@Julien73, I created a Python script for importing issues from one JIRA project to another with comments and attachments, see https://github.com/mrts/ask-jira, export_import_issues_for_jql
. Feel free to ask if you are unsure how to use it.
@Mart Sõmermaa - Hi Matt, great script and it works mostely perfect. ;-) The only issue I have is while adding the attatchment to the new Jira ticket. I always get an error 500 with an empty error text. Do you have any idea what could be the cause here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have identified the issue: The script currently doesn't support special characters like ä or é for attachment file names.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the good words and for reporting the issue, Martin!
Please try the fix in this branch and see if if fixes the issue:
https://github.com/mrts/ask-jira/tree/attachment-normalize-filename
Here is the fix for review:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mart, I have attempted to use this script to migrate a project from on JIRA instance to another everytime hit the following error:-
(venv) ➜ ask-jira git:(master) ✗ ./ask-jira.py export_import_issues_for_jql 'project=ACT AND issuetype not in subTaskIssueTypes() AND issuetype != Epic' Traceback (most recent call last): File "./ask-jira.py", line 111, in <module> _main() File "./ask-jira.py", line 71, in _main command(jira, args) File "./ask-jira.py", line 58, in export_import_issues_for_jql exportimportconfig, args.jql) File "/Users/gluzangi/DevOps/ops.infra/jira.migrations/ask-jira/lib/export_import.py", line 8, in export_import_issues import_jira = JIRA({'server': import_conf.JIRA['server']}, AttributeError: 'module' object has no attribute 'JIRA'
Listing projects and fields is fine - this AttributeError: a module with a missing JIRA attribute appears during the export_import_issues_for_jql command.
Any ideas/pointers to what is wrong with my execution?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gerald!
Sure thing,
'module' object has no attribute 'JIRA'
means that your exportimportconfig.py
is missing JIRA configuration in JIRA
variable, it should look like this:
JIRA = { "server": "https://example.com/jira/", "user": "user", "password": "password" } ... other variables ...
An earlier version of README didn't have information about this and the example configuration file exportimportconfig-sample.py
contained a misleading variable name. These issues have now been fixed.
Hope that helps!
Best,
Mart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does anyone know if this works when transfering data from an old instance of Jira into a brand new one?
The old version is
and the new version is
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you need to import attachments and you want to do that with the ask-jira script referred above, then yes, it works with the versions you listed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a 4-year old thread, your question and/or answers are probably irrelevant. I'd suggest asking a full question again for a wider audience and a more up-to-date answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mart,
I am facing below error while running 'export_import_issues_for_jql'.
AttributeError: type object 'PropertyHolder' has no attribute 'labels'
Can you please help me to resolve?
Details of the error:-
D:\jira-python\ask-jira>python ./ask-jira.py export_import_issues_for_jql "project = TMOVE AND issuetype not in subTaskIssueType
) AND issuetype != Epic ORDER BY key ASC"
About to export/import 50 issues
Exporting TMOVE-134 Traceback (most recent call last):
File "./ask-jira.py", line 133, in
_main()
File "./ask-jira.py", line 90, in _main
command(jira, args)
File "./ask-jira.py", line 59, in export_import_issues_for_jql
exportimportconfig, args.jql)
File "D:\jira-python\ask-jira\lib\export_import.py", line 15, in export_import_issues
_make_new_issues(source_jira, target_jira, issues, conf, result, None)
File "D:\jira-python\ask-jira\lib\export_import.py", line 24, in _make_new_issues
fields = _get_new_issue_fields(issue.fields, conf)
File "D:\jira-python\ask-jira\lib\export_import.py", line 66, in _get_new_issue_fields
value = getattr(fields, name)
AttributeError: type object 'PropertyHolder' has no attribute 'labels'
Thanks,
Sahidul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is a four-year old thread, your question and/or answers are probably irrelevant. I'd suggest asking a full question again for a wider audience and a more up-to-date answer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks you for all your answers however I still don't have any solution to my problem:
I have tried the project configurator pluggin with the evaluation license but it seems the this licence gives only the ability to upload a file (import) and not to create the export file (export), which is not very helpfull...
I have checked the link to https://confluence.atlassian.com/pages/viewpage.action?pageId=307038033but this is a manual workaround that I can't use. I have more than 500 issues to export from a JIRA instance and re-import them in another instance. I can't manually copy the attached file in a folder and put the hyperlink in the CVS file for more than 500 issues. What I need is actually pretty standard : Importing an exporting all tickets data.
You say that you have custom tools to import/export a list of Issue. Can you please develop more about those tools. I really need to know which tools you are talking about.
- I used the basic export to excel on (Issues/View/Excel (All fields)) to create the csv file.
- I then go to Import & Export / Import external projects / Import projects and issues from a Comma Separated Values (CSV) file into JIRA to import the CSV file.
I have the issue imported but of course as the exported file is a CSV one, it does not import the attachements to the issues.
Regards,
Julien
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 can use JIRA's export/import project support. BUT, you first need to ensure a lot of configuration matches between the source and destination instances. (Such as workflows, CF's etc..)
We can help out with this as we have custom tools to do this, however, I also did spot this plugin which may help as well.
https://marketplace.atlassian.com/plugins/com.awnaba.projectconfigurator.projectconfigurator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.