Patch #2114

Fixed Bugs in Importer Area

Added by Karl Heinz Marbaise almost 9 years ago. Updated over 8 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:-

Description

Hi,
i have created separate class and unit test to fix the following issues:
#1949, #1950, #2023, #2052, #2053, #2054, #2068, #2089

It will make #2050 needless. Other information for example in which directories they should be put into, can be found in the forum discussion

Suggestions about the code etc. are appreciated.
Kind regards
Karl Heinz Marbaise

migrate_from_trac.rake Magnifier - Rake file (26.8 KB) Karl Heinz Marbaise, 2008-10-30 22:15

trac_migration.rb Magnifier (10.6 KB) Karl Heinz Marbaise, 2008-10-30 22:15

migration_trac_test.rb Magnifier - Unit Tests (7.93 KB) Karl Heinz Marbaise, 2008-11-07 16:12

trac_migration.rb Magnifier - Updated Conversion (12.2 KB) Karl Heinz Marbaise, 2008-11-07 16:12

migrate_from_trac.rake Magnifier - Just to be complete (26.8 KB) Karl Heinz Marbaise, 2008-11-07 16:12


Related issues

Related to Redmine - Defect #1949: Milestones after Migration from Trac to Redmine are not m... Closed 2008-09-25
Related to Redmine - Defect #1950: Content of the Milestone page is not converted. Closed 2008-09-25
Related to Redmine - Patch #2023: Migration from Trac to Redmine import of highlighting cod... Closed 2008-10-11
Related to Redmine - Patch #2052: Milestones will not correctly converted. Closed 2008-10-19
Related to Redmine - Patch #2053: Trac: Migration of ticket:123 or [ticket:34] do not work Closed 2008-10-19
Related to Redmine - Patch #2054: Trac Tables are not converted into Redmine New 2008-10-19
Related to Redmine - Defect #2068: [source:XYZ@latest#L142 Line 3434] will not be converted New 2008-10-22
Related to Redmine - Defect #2089: [mailto:supose@soebes.de] will not correctly converted New 2008-10-25

History

#1 Updated by Karl Heinz Marbaise almost 9 years ago

Hi,
i have created separate class and unit test to fix the following issues:
#1949, #1950, #2023, #2052, #2053, #2054, #2068, #2089

I have continued my work...Uups..forget to attach the Unit Tests...sorry..
Ok. The update will fix #2146

Kind regards
Karl Heinz Marbaise

#2 Updated by Enderson Maia over 8 years ago

I tried this over 0.8.4 and I get this error when I run.

# rake redmine:migrate_from_trac RAILS_ENV="production" --trace
(in /var/www/rails/redmine-0.8.4)
** Invoke redmine:migrate_from_trac (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:migrate_from_trac

WARNING: a new project will be added to Redmine during this process.
Are you sure you want to continue ? [y/N] y

Trac directory []: /var/lib/trac/myproject
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: sqlite3
Trac database encoding [UTF-8]:
Target project identifier []: myproject

Migrating components...
Migrating milestones....
Migrating custom fields
Migrating tickets..rake aborted!
wrong number of arguments (1 for 0)
/var/www/rails/redmine-0.8.4/app/models/attachment.rb:76:in `read'
/var/www/rails/redmine-0.8.4/app/models/attachment.rb:76:in `before_save'
/var/www/rails/redmine-0.8.4/app/models/attachment.rb:74:in `open'
/var/www/rails/redmine-0.8.4/app/models/attachment.rb:74:in `before_save'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/callbacks.rb:301:in `send'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/callbacks.rb:301:in `callback'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/callbacks.rb:206:in `create_or_update'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/base.rb:2211:in `save_without_validation'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/validations.rb:911:in `save_without_dirty'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/dirty.rb:75:in `save_without_transactions'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `transaction'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/transactions.rb:79:in `transaction'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/transactions.rb:98:in `transaction'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/transactions.rb:118:in `rollback_active_record_state!'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/transactions.rb:106:in `save'
/var/www/rails/redmine-0.8.4/lib/tasks/migrate_from_trac.rake:423:in `migrate'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:277:in `method_missing'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `method_missing'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `each'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `send'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/associations/association_proxy.rb:171:in `method_missing'
/var/www/rails/redmine-0.8.4/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb:277:in `method_missing'
/var/www/rails/redmine-0.8.4/lib/tasks/migrate_from_trac.rake:416:in `migrate'
/var/www/rails/redmine-0.8.4/lib/tasks/migrate_from_trac.rake:362:in `each'
/var/www/rails/redmine-0.8.4/lib/tasks/migrate_from_trac.rake:362:in `migrate'
/var/www/rails/redmine-0.8.4/lib/tasks/migrate_from_trac.rake:652
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/opt/ruby-enterprise-1.8.6-20090610/bin/rake:19:in `load'
/opt/ruby-enterprise-1.8.6-20090610/bin/rake:19

Also available in: Atom PDF