Defect #14590

migrate_from_trac.rake does not import Trac users, uses too short password

Added by Craig Rodrigues over 4 years ago. Updated about 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Importers
Target version:2.3.4
Resolution:Fixed Affected version:

Description

I was testing migrate_from_trac.rake and found that it was not importing the user database from trac.
I substituted ".save" with ".save!" in a few places in the script and found this error:

Validation failed: Password is too short (minimum is 8 characters)
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/validations.rb:56:in `save!'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:33:in `save!'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/transactions.rb:264:in `block in save!'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/transactions.rb:208:in `transaction'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/usr/local/lib/ruby/gems/1.9/gems/activerecord-3.2.13/lib/active_record/transactions.rb:264:in `save!'
/usr/local/www/redmine/lib/tasks/migrate_from_trac.rake:280:in `find_or_create_user'
/usr/local/www/redmine/lib/tasks/migrate_from_trac.rake:435:in `block in migrate'
/usr/local/www/redmine/lib/tasks/migrate_from_trac.rake:428:in `each'
/usr/local/www/redmine/lib/tasks/migrate_from_trac.rake:428:in `migrate'

Changing the default password for created users from 'trac'
to 'tracmigratetoredmine' fixed the problem.

See attached patch.

Related to: #14567

migrate_from_trac.rake.txt Magnifier (672 Bytes) Craig Rodrigues, 2013-08-01 07:40


Related issues

Related to Redmine - Patch #14567: migrate_from_trac.rake does not convert timestamps in Tra... New
Related to Redmine - Defect #14960: migrate_from_mantis.rake does not import Mantis users, us... Closed
Duplicated by Redmine - Defect #14646: Migrating from Trac, users are not imported Closed

Associated revisions

Revision 12163
Added by Jean-Philippe Lang about 4 years ago

Fixed that Mantis/Trac users are not imported because of password too short (#14590).

Revision 12211
Added by Jean-Philippe Lang about 4 years ago

Merged r12163 from trunk (#14590, #14592).

History

#1 Updated by Toshi MARUYAMA over 4 years ago

  • Related to Patch #14567: migrate_from_trac.rake does not convert timestamps in Trac database version 23 added

#2 Updated by Etienne Massip over 4 years ago

  • Related to Defect #14646: Migrating from Trac, users are not imported added

#3 Updated by Etienne Massip over 4 years ago

  • Related to deleted (Defect #14646: Migrating from Trac, users are not imported)

#4 Updated by Etienne Massip over 4 years ago

  • Duplicated by Defect #14646: Migrating from Trac, users are not imported added

#5 Updated by Mischa The Evil about 4 years ago

  • Related to Defect #14960: migrate_from_mantis.rake does not import Mantis users, uses too short password added

#6 Updated by Jean-Philippe Lang about 4 years ago

  • Tracker changed from Patch to Defect
  • Subject changed from migrate_from_trac.rake does not import Trac users, uses too short a password to migrate_from_trac.rake does not import Trac users, uses too short password
  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.3.4

I've fixed it r12163 using another approach, thanks for pointing this out.

#7 Updated by Jean-Philippe Lang about 4 years ago

  • Status changed from Resolved to Closed
  • Resolution set to Fixed

Merged.

Also available in: Atom PDF