From 0a629237fd2088914a901f1b926d899838bf474b Mon Sep 17 00:00:00 2001
From: Jean-Philippe Lang <jp_lang@yahoo.fr>
Date: Sat, 25 Aug 2007 15:53:40 +0000
Subject: [PATCH] Mantis importer: small fix in categories mapping.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@661 e93f8b46-1217-0410-a6f0-8f06a7374b81
---
 lib/tasks/migrate_from_mantis.rake | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake
index 14aa2f463..e7c1afd98 100644
--- a/lib/tasks/migrate_from_mantis.rake
+++ b/lib/tasks/migrate_from_mantis.rake
@@ -310,7 +310,7 @@ task :migrate_from_mantis => :environment do
                       :created_on => bug.date_submitted,
                       :updated_on => bug.last_updated
     	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.status = STATUS_MAPPING[bug.status] || DEFAULT_STATUS
     	i.tracker = (bug.severity == 10 ? TRACKER_FEATURE : TRACKER_BUG)
-- 
GitLab