From 343cab8148b0313dd7cf5368f9f177698443f682 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 13 Aug 2007 15:51:23 +0000 Subject: Mantis importer: steps_to_reproduce and additional_information fields added to issue description. git-svn-id: http://redmine.rubyforge.org/svn/trunk@627 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/migrate_from_mantis.rake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake index e571ae41e..ed9b07b3b 100644 --- a/lib/tasks/migrate_from_mantis.rake +++ b/lib/tasks/migrate_from_mantis.rake @@ -137,7 +137,16 @@ task :migrate_from_mantis => :environment do end class MantisBugText < ActiveRecord::Base - set_table_name :mantis_bug_text_table + set_table_name :mantis_bug_text_table + + # Adds Mantis steps_to_reproduce and additional_information fields + # to description if any + def full_description + full_description = description + full_description += "\n\n*Steps to reproduce:*\n\n#{steps_to_reproduce}" unless steps_to_reproduce.blank? + full_description += "\n\n*Additional information:*\n\n#{additional_information}" unless additional_information.blank? + full_description + end end class MantisBugNote < ActiveRecord::Base @@ -279,7 +288,7 @@ task :migrate_from_mantis => :environment do next unless projects_map[bug.project_id] i = Issue.new :project_id => projects_map[bug.project_id], :subject => encode(bug.summary), - :description => encode(bug.bug_text.description), + :description => encode(bug.bug_text.full_description), # TODO :priority => Enumeration.get_values('IPRI').first, :created_on => bug.date_submitted, -- cgit v1.2.3