summaryrefslogtreecommitdiffstats
path: root/lib/tasks
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-13 15:51:23 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-08-13 15:51:23 +0000
commit343cab8148b0313dd7cf5368f9f177698443f682 (patch)
tree20229434c45963f82f068addccbf85823068e8ec /lib/tasks
parentf179eee7a00d8eb84ffd19f306c08735dac50e11 (diff)
downloadredmine-343cab8148b0313dd7cf5368f9f177698443f682.tar.gz
redmine-343cab8148b0313dd7cf5368f9f177698443f682.zip
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
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/migrate_from_mantis.rake13
1 files 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,