Mantis importer: small fix in categories mapping.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@661 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-08-25 15:53:40 +00:00
parent f44f6c7876
commit 0a629237fd
1 changed files with 1 additions and 1 deletions

View File

@ -310,7 +310,7 @@ task :migrate_from_mantis => :environment do
:created_on => bug.date_submitted, :created_on => bug.date_submitted,
:updated_on => bug.last_updated :updated_on => bug.last_updated
i.author = User.find_by_id(users_map[bug.reporter_id]) i.author = User.find_by_id(users_map[bug.reporter_id])
i.category = IssueCategory.find_by_project_id_and_name(i.project_id, bug.category) unless bug.category.blank? i.category = IssueCategory.find_by_project_id_and_name(i.project_id, bug.category[0,30]) unless bug.category.blank?
i.fixed_version = Version.find_by_project_id_and_name(i.project_id, bug.fixed_in_version) unless bug.fixed_in_version.blank? i.fixed_version = Version.find_by_project_id_and_name(i.project_id, bug.fixed_in_version) unless bug.fixed_in_version.blank?
i.status = STATUS_MAPPING[bug.status] || DEFAULT_STATUS i.status = STATUS_MAPPING[bug.status] || DEFAULT_STATUS
i.tracker = (bug.severity == 10 ? TRACKER_FEATURE : TRACKER_BUG) i.tracker = (bug.severity == 10 ? TRACKER_FEATURE : TRACKER_BUG)