Open thigg opened 2 years ago
Anybody found a way to migrate Jira issues (with comments and attachments) to Gitea?
I think Jira could have so many different customizations that it would be not feasible to implement that into gitea, that should probably be done as external tool to import using gitea api
No need to import customized things.
How about having empty Gitea instance and then use REPLACE INTO SQL statements to populate "issue" and "comment" Gitea tables based on Jira tables? Would that work?
For basic issue data that could probably work
Please find attached SQL queries to directly migrate issues from Jira to Gitea, including comments, attachments and string based custom fields.
Warning: It deletes all issues, comments and attachments from Gitea. Please read all comments carefully.
Here is simple and very dirty tool which I used to import jira issues into gitea's SQL Server database. Should be easy to port other DB servers though.
Using @achikhv tool, I modified it to work with MySQL, I will be publishing it as one of my repositories in the near future. There also is some errors in achikhvs tool I fixed.
Once it is published, please add your repo to https://gitea.com/gitea/awesome-gitea#migration.
Using @achikhv tool, I modified it to work with MySQL, I will be publishing it as one of my repositories in the near future. There also is some errors in achikhvs tool I fixed.
Would love to see PR's with fixes. Could be useful to others.
Here you have the code, it works fine and documentation is better, hope it helps! https://github.com/juangarcia06/jira2giteaMySql Was quite a lot of work. I didn't get attachments working. If anyone can get them to work and can make a pull request I would appreciate it a lot since this took me about 2 weeks of work.
Trying out @juangarcia06's importer, but I'm getting 400's (bad request) when it tries to fetch the data from Jira. I'm certain I have the correct login/password in launchSettings.json. However, I am trying to import from a local Jira instance (JiraServer url is http://192.168.5.40:9876). Has anyone else gotten this to work? Any ideas?
Edit: Nevermind, figured it out. For anyone else: the instructions say --JiraFilter searchSomethingInJiraAndGetTheFilterFromTheUrl
, but the filter must be numeric. If you have a url like /issues/?filter=allopenissues
, you cannot use allopenissues
as the jiraFilter. You must re-save it as your own filter, which will then show it as a number, and use that.
Also for anyone interested: the script can be tweaked to work with sqlite fairly easily:
Microsoft.Data.Sqlite
var sqlc = new SqliteConnection("Data Source=path_to_your_db.db");
MySqlConnection
with SqliteConnection
ON DUPLICATE KEY UPDATE
query with insert or replace into issue_index (group_id,max_index) values ({_repoId},{maxIndex})
LAST_INSERT_ID()
with last_insert_rowid()
insertCmd.LastInsertedId
with extension method from hereOh and I just realized: this is importing comments, but not comment counts. i.e. although the comments are actually there, all the issues show a count of 0 comments. And even if you add your own comments to those imported issues, the counts remain as 0.
Looks like the issue is it's not properly setting the issue.num_comments
column.
Feature Description
It should be possible to migrate issues from jira to gitea.
Currently its possible to import issues from Jira into gitlab and migrate it afterwards into gitea. As of now this unfortunatley does neither migrate comments or attachments into gitlab, thus they cannot be migrated to gitea in turn.
Gitlab mitigates this a bit by linking the original jira issue. This is useful in cases where you have the jira instance left on the network for a while at least.
Thus I propose two things:
Screenshots
No response