We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello!
Both bugzilla and redmine are using mysql databases, the script aborts at the issue migration:
Migrating profiles ................................................... Migrating products.................................... Migrating relationship product/profile Migrating issues rake aborted! Validation failed: Tracker is not included in the list /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/validations.rb:56:in save!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/dirty.rb:33:insave!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:264:in block in save!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:313:inblock in with_transaction_returning_status' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in transaction' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:208:intransaction' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:311:in with_transaction_returning_status' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:264:insave!' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:403:in block in migrate_issues' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:371:ineach' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:371:in migrate_issues' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:574:inmodule:BugzillaMigrate' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:46:in block (2 levels) in <top (required)>' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:incall' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:in block in execute' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:ineach' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:in execute' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:175:inblock in invoke_with_call_chain' /usr/lib/ruby/2.1.0/monitor.rb:211:in mon_synchronize' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:168:ininvoke_with_call_chain' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:161:in invoke' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:149:ininvoke_task' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in block (2 levels) in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:ineach' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in block in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:115:inrun_with_threads' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:100:in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:78:inblock in run' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:165:in standard_exception_handling' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:75:inrun' /var/lib/gems/2.1.0/gems/rake-10.1.1/bin/rake:33:in <top (required)>' /usr/local/bin/rake:23:inload' /usr/local/bin/rake:23:in `
save!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/dirty.rb:33:in
block in save!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:313:in
transaction' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:208:in
with_transaction_returning_status' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:264:in
block in migrate_issues' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:371:in
migrate_issues' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:574:in
block (2 levels) in <top (required)>' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:in
block in execute' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:in
execute' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:175:in
mon_synchronize' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:168:in
invoke' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:149:in
block (2 levels) in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in
block in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:115:in
top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:78:in
standard_exception_handling' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:75:in
<top (required)>' /usr/local/bin/rake:23:in
After some research I found the cause of the problem. You have to assign the tracker "Bug" to the newly created project, so I added the line 316:
BugzillaProduct.find_each do |product| project = Project.new project.name = product.name project.description = product.description project.identifier = "#{product.name.downcase.gsub(/[^a-z0-9]+/, '-')[0..10]}-#{product.id}" project.is_public = false project.trackers << TRACKER_BUG unless project.trackers.include?(TRACKER_BUG) project.save!
Then the migration worked like a charm.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello!
Both bugzilla and redmine are using mysql databases, the script aborts at the issue migration:
Migrating profiles
'...................................................
Migrating products....................................
Migrating relationship product/profile
Migrating issues
rake aborted!
Validation failed: Tracker is not included in the list
/var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/validations.rb:56:in
save!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/attribute_methods/dirty.rb:33:in
save!'/var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:264:in
block in save!' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:313:in
block in with_transaction_returning_status'/var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in
transaction' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:208:in
transaction'/var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:311:in
with_transaction_returning_status' /var/lib/gems/2.1.0/gems/activerecord-3.2.19/lib/active_record/transactions.rb:264:in
save!'/opt/redmine/lib/tasks/migrate_from_bugzilla.rake:403:in
block in migrate_issues' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:371:in
each'/opt/redmine/lib/tasks/migrate_from_bugzilla.rake:371:in
migrate_issues' /opt/redmine/lib/tasks/migrate_from_bugzilla.rake:574:in
module:BugzillaMigrate'/opt/redmine/lib/tasks/migrate_from_bugzilla.rake:46:in
block (2 levels) in <top (required)>' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:in
call'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:236:in
block in execute' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:in
each'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:231:in
execute' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:175:in
block in invoke_with_call_chain'/usr/lib/ruby/2.1.0/monitor.rb:211:in
mon_synchronize' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:168:in
invoke_with_call_chain'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/task.rb:161:in
invoke' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:149:in
invoke_task'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in
block (2 levels) in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in
each'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:106:in
block in top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:115:in
run_with_threads'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:100:in
top_level' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:78:in
block in run'/var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:165:in
standard_exception_handling' /var/lib/gems/2.1.0/gems/rake-10.1.1/lib/rake/application.rb:75:in
run'/var/lib/gems/2.1.0/gems/rake-10.1.1/bin/rake:33:in
<top (required)>' /usr/local/bin/rake:23:in
load'/usr/local/bin/rake:23:in `
Tasks: TOP => redmine:migrate_from_bugzilla
After some research I found the cause of the problem. You have to assign the tracker "Bug" to the newly created project, so I added the line 316:
Then the migration worked like a charm.
The text was updated successfully, but these errors were encountered: