]> source.dussan.org Git - redmine.git/commitdiff
Mantis importer:
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Jan 2008 22:31:26 +0000 (22:31 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 23 Jan 2008 22:31:26 +0000 (22:31 +0000)
* do not truncate projects descriptions
* encode attachment filenames to utf8

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1100 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_mantis.rake

index 6d8d55e7c09a0c1b448555a0911cc816d1f32006..36e7e1514ba71a79983535705636ded22757055c 100644 (file)
@@ -118,10 +118,6 @@ task :migrate_from_mantis => :environment do
         read_attribute(:name)[0..29]\r
       end\r
       \r
-      def description\r
-        read_attribute(:description).blank? ? read_attribute(:name) : read_attribute(:description)[0..254]\r
-      end\r
-      \r
       def identifier\r
         read_attribute(:name).underscore[0..19].gsub(/[^a-z0-9\-]/, '-')\r
       end\r
@@ -186,7 +182,7 @@ task :migrate_from_mantis => :environment do
       end\r
       \r
       def original_filename\r
-        filename\r
+        MantisMigrate.encode(filename)\r
       end\r
       \r
       def content_type\r
@@ -445,7 +441,6 @@ task :migrate_from_mantis => :environment do
       end\r
     end\r
     \r
-  private\r
     def self.encode(text)\r
       @ic.iconv text\r
     rescue\r