Created
January 23, 2012 12:09
-
-
Save 4EverBuilder/1662779 to your computer and use it in GitHub Desktop.
SQL To get Redmine CSV export. Can be imported to JIRA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"field.subject" : "summary", | |
"project.lead" : "YOUR USERNAME", | |
"field.category" : "components", | |
"value.status.Closed" : "6", | |
"value.status.New" : "3", | |
"date.import.format" : "yyyy-MM-dd", | |
"value.status.Feedback" : "3", | |
"field.tracker" : "issuetype", | |
"project.name" : "Project", | |
"field.version" : "fixVersions", | |
"field.status" : "status", | |
"field.description" : "comment", | |
"value.status.Resolved" : "5", | |
"field.start_date" : "created", | |
"value.status.QA" : "3", | |
"user.email.suffix" : "@your_domain.com", | |
"field.reporter" : "reporter", | |
"value.status.Assigned" : "3", | |
"date.fields" : "start_date", | |
"field.id" : "issue-id", | |
"value.status.Not a bug" : "6", | |
"project.key" : "YOUR PROJECT KEY", | |
"mapfromcsv" : "false", | |
"value.status.Rejected" : "3", | |
"field.assignee" : "assignee" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
I.id | |
, I.subject | |
, T.name as tracker | |
, CONCAT('Legacy Redmine Link: http://YOUR_REDMINE_INSTALL/issues/' , I.Id , '\n\n\n' , I.description , '\n\n\n' , | |
(SELECT IFNULL(GROUP_CONCAT( CONCAT('On ' , j.created_on , ' ' , (SELECT CONCAT(uj.firstname , ' ' , uj.lastname) FROM users uj WHERE u.id = j.user_id LIMIT 1) , ' wrote :' , j.notes , '\n\n\n' )) , ' ') FROM journals j WHERE j.journalized_id = I.id AND j.journalized_type = 'Issue' AND TRIM(j.notes) != '' ) | |
) as description | |
, C.name as category | |
, S.name as status | |
, u.login as assignee | |
, u2.login as reporter | |
, V.name as version | |
, I.start_date | |
FROM | |
issues I LEFT JOIN users u ON I.assigned_to_id = u.id | |
LEFT JOIN users u2 ON I.author_id = u2.id | |
LEFT JOIN issue_categories C ON C.id = I.category_id | |
LEFT JOIN versions V ON V.id = I.fixed_version_id | |
, issue_statuses S , trackers T | |
WHERE | |
I.project_id = 1 | |
AND S.id = I.status_id | |
AND T.id = I.tracker_id | |
ORDER BY 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added attachments and comments: