@@ -137,7 +137,16 task :migrate_from_mantis => :environment do | |||||
137 | end |
|
137 | end | |
138 |
|
138 | |||
139 | class MantisBugText < ActiveRecord::Base |
|
139 | class MantisBugText < ActiveRecord::Base | |
140 |
set_table_name :mantis_bug_text_table |
|
140 | set_table_name :mantis_bug_text_table | |
|
141 | ||||
|
142 | # Adds Mantis steps_to_reproduce and additional_information fields | |||
|
143 | # to description if any | |||
|
144 | def full_description | |||
|
145 | full_description = description | |||
|
146 | full_description += "\n\n*Steps to reproduce:*\n\n#{steps_to_reproduce}" unless steps_to_reproduce.blank? | |||
|
147 | full_description += "\n\n*Additional information:*\n\n#{additional_information}" unless additional_information.blank? | |||
|
148 | full_description | |||
|
149 | end | |||
141 | end |
|
150 | end | |
142 |
|
151 | |||
143 | class MantisBugNote < ActiveRecord::Base |
|
152 | class MantisBugNote < ActiveRecord::Base | |
@@ -279,7 +288,7 task :migrate_from_mantis => :environment do | |||||
279 | next unless projects_map[bug.project_id] |
|
288 | next unless projects_map[bug.project_id] | |
280 | i = Issue.new :project_id => projects_map[bug.project_id], |
|
289 | i = Issue.new :project_id => projects_map[bug.project_id], | |
281 | :subject => encode(bug.summary), |
|
290 | :subject => encode(bug.summary), | |
282 | :description => encode(bug.bug_text.description), |
|
291 | :description => encode(bug.bug_text.full_description), | |
283 | # TODO |
|
292 | # TODO | |
284 | :priority => Enumeration.get_values('IPRI').first, |
|
293 | :priority => Enumeration.get_values('IPRI').first, | |
285 | :created_on => bug.date_submitted, |
|
294 | :created_on => bug.date_submitted, |
General Comments 0
You need to be logged in to leave comments.
Login now