From 170543b2b0ab11520992289ee2261743428d608d Mon Sep 17 00:00:00 2001 From: Lars Christensen Date: Tue, 11 Feb 2014 08:30:40 +0100 Subject: [PATCH 1/3] Set subject to something if empty --- migrate_from_bugzilla.rake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/migrate_from_bugzilla.rake b/migrate_from_bugzilla.rake index 6f82e5a..e0b8c8f 100644 --- a/migrate_from_bugzilla.rake +++ b/migrate_from_bugzilla.rake @@ -372,9 +372,12 @@ namespace :redmine do #puts "Processing bugzilla bug #{bug.bug_id}" description = bug.descriptions.first.text.to_s + subject = bug.short_desc + subject = "No description" if subject.empty? + issue = Issue.new( :project_id => @project_map[bug.product_id], - :subject => bug.short_desc, + :subject => subject, :description => description || bug.short_desc, :author_id => map_user(bug.reporter), :priority => PRIORITY_MAPPING[bug.priority] || DEFAULT_PRIORITY, From bd521f0a5d1e38b70122f607f6af78f6777ece02 Mon Sep 17 00:00:00 2001 From: Lars Christensen Date: Tue, 11 Feb 2014 08:30:57 +0100 Subject: [PATCH 2/3] Set ID to bugzilla ID --- migrate_from_bugzilla.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate_from_bugzilla.rake b/migrate_from_bugzilla.rake index e0b8c8f..0852bd4 100644 --- a/migrate_from_bugzilla.rake +++ b/migrate_from_bugzilla.rake @@ -385,7 +385,7 @@ namespace :redmine do :start_date => bug.creation_ts, :created_on => bug.creation_ts, :updated_on => bug.delta_ts - ) + ) { |t| t.id = bug.bug_id } issue.tracker = TRACKER_BUG # issue.category_id = @category_map[bug.component_id] From 06f6588f8bc0734bdb6250fb29d672ee03a65e06 Mon Sep 17 00:00:00 2001 From: Lars Christensen Date: Tue, 11 Feb 2014 08:31:12 +0100 Subject: [PATCH 3/3] Set VERIFIED bugs to CLOSED status --- migrate_from_bugzilla.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrate_from_bugzilla.rake b/migrate_from_bugzilla.rake index 0852bd4..5627658 100644 --- a/migrate_from_bugzilla.rake +++ b/migrate_from_bugzilla.rake @@ -53,7 +53,7 @@ namespace :redmine do STATUS_MAPPING = { "UNCONFIRMED" => DEFAULT_STATUS, "NEW" => DEFAULT_STATUS, - "VERIFIED" => DEFAULT_STATUS, + "VERIFIED" => CLOSED_STATUS, "ASSIGNED" => assigned_status, "REOPENED" => assigned_status, "RESOLVED" => resolved_status,