Patch #989
openMigration task from Bugzilla
Added by Arjen Roodselaar over 16 years ago. Updated over 12 years ago.
0%
Description
I created this migration script last summer to do a basic migration from Bugzilla. Unfortunately I don't have a Bugzilla db at hand to test it against the current trunk, so it might be broken.
It currently migrates the following:
- Bugzilla products to Redmine projects, including Bugzilla components as Redmine catagories and versions
- Users
- Bugs, including comments
It does NOT preserve relations between bugs, or attached files. Be advised that after the user migration you need to give users the proper project rights by hand. You could probably automate this by setting a default.
Files
migrate_from_bugzilla.rake (11.6 KB) migrate_from_bugzilla.rake | Migration task from Bugzilla | Arjen Roodselaar, 2008-04-03 23:00 | |
bz2redmine.rb (16.7 KB) bz2redmine.rb | Alexander Zhovnuvaty, 2010-04-06 23:17 | ||
settings.rb (1.88 KB) settings.rb | Alexander Zhovnuvaty, 2010-04-06 23:17 | ||
bugzilla-1.0.4.patch (25.9 KB) bugzilla-1.0.4.patch | Brian Lindahl, 2011-01-25 20:05 |
Updated by Bernie Telles about 15 years ago
I'm getting an error when trying to run this task, and can,t figure out what,s going on. Can anyone help me troubleshoot?
Here's the error:
Migrating profiles..
Migrating products.
rake aborted!
compile error
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1912: syntax error, unexpected tINTEGER
BugzillaMigrate::0
^
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1912:in `compute_type'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1432:in `instantiate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:586:in `find_by_sql'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:586:in `collect!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:586:in `find_by_sql'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1345:in `find_every'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1307:in `find_initial'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:538:in `find'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:47:in `find'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:54:in `first'
/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:269:in `migrate'
/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:264:in `each'
/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:264:in `migrate'
/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:344
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:636:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:636:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:631:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:631:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:583:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2047:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2025:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2025:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2025:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2064:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2019:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1997:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2064:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1994:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Migrating bugs
Updated by Ralph Juhnke almost 15 years ago
I created another migration script.
We have been successfully using it to convert an existing Bugzilla 3.4-Installation
to Redmine 0.8.x and the current Redmine trunk.
You can find the script here: http://github.com/ralli/bz2redmine
Updated by Ralph Juhnke over 14 years ago
I have been adapting Arjen Roodselaars migrate_from_bugzilla task to work with current versions of Redmine and Bugzilla.
The task now migrates attachments and relations between bugs.
I've been testing it to convert a Bugzilla 3.4.x database to Redmine 0.8.x and 0.9.
You can find the sources here: http://github.com/ralli/migrate_from_bugzilla.
I would appreciate any feedback, if it worked.
Updated by Steven Friedman over 14 years ago
I am preparing to migrate one of the projects from bugzilla to redmine, and I would like to know whether the migration script can be restricted to only transfer my project (and not the others in bugzilla) and also whether it will transfer all of the bugs or only the open bugs?
Updated by Daniel Beland over 14 years ago
Ralph Juhnke wrote:
I would appreciate any feedback, if it worked.
Hi Ralph,
I just started using redmine and tried your script but it failed straight away when importing the first user. It complained that a user with id 1 already exists.
So I updated the id of the redmine admin user to 0 (directly in mysql) and then run the script again and it worked. Maybe you should do something similar in the script!
Thanks!
Updated by Ralph Juhnke over 14 years ago
Daniel Beland wrote:
Ralph Juhnke wrote:
I would appreciate any feedback, if it worked.
Hi Ralph,
I just started using redmine and tried your script but it failed straight away when importing the first user. It complained that a user with id 1 already exists.
So I updated the id of the redmine admin user to 0 (directly in mysql) and then run the script again and it worked. Maybe you should do something similar in the script!Thanks!
Hello Daniel,
thank you for your reply. the import should work now.
Updated by Ralph Juhnke over 14 years ago
Steven Friedman wrote:
I am preparing to migrate one of the projects from bugzilla to redmine, and I would like to know whether the migration script can be restricted to only transfer my project (and not the others in bugzilla) and also whether it will transfer all of the bugs or only the open bugs?
it would not be easy to restrict the script to a single project since it just does a plain copy of the bugzilla data (first all users, then all projects, then all bugs, then all attachments etc.).
Currently it will copy all bugs and not just the open ones.
Updated by Alexander Zhovnuvaty over 14 years ago
- File bz2redmine.rb bz2redmine.rb added
- File settings.rb settings.rb added
Ralph Juhnke wrote:
I created another migration script.
We have been successfully using it to convert an existing Bugzilla 3.4-Installation
to Redmine 0.8.x and the current Redmine trunk.You can find the script here: http://github.com/ralli/bz2redmine
Hi Ralph,
I've encountered certain issues after I tried to migrate data from Bugzilla to Redmine using this script:
- Values from custom URL field are not migrated;
- References to duplicated items have been imported in reverse order (have opposite meaning);
- Dependencies have been imported in reverse order (have opposite meaning);
- Categories are not imported;
- Watchers are not imported;
- Target Version field has wrong mapping. It is mapped to Version field instead of Target Milestone;
- Verified item in bugzilla has "In progress" status in redmine;
- Groups are not migrated;
- User->Group relations are not migrated;
- Project->Member relations are not migrated;
- User name and surename are mixed up.
Attached files contain respective fixes for the issues above. Also, few more minor issues have been resolved as well. You may try to migrate the data using the attached files and going closely to the following scenario:
1. Execute the attached bz2redmine.rb migration script;
2. Ensure the migration script have been performed with no errors;
3. Grant administrator permissions to certain users. In this particular case for users with 1, 13 ids;
update users set admin = true where id in (1, 13);
4. Activate products:
update projects set status = 1, lft = 1, rgt = 2 where id = 1; -- Project 1
update projects set status = 1, lft = 3, rgt = 4 where id = 2; -- Project 2
update projects set status = 1, lft = 5, rgt = 6 where id = 3; -- Project 3
update projects set status = 1, lft = 7, rgt = 8 where id = 4; -- Project 4
update projects set status = 1, lft = 9, rgt = 10 where id = 5; -- Project 5
update projects set status = 1, lft = 11, rgt = 12 where id = 6; -- Project 6
update projects set status = 1, lft = 13, rgt = 14 where id = 7; -- Project 7
Finally, the data has been successfully migrated. Hope it will help to someone.
Thanks, Alex
Updated by Ralph Juhnke over 14 years ago
Alexander Zhovnuvaty wrote:
Ralph Juhnke wrote:
I created another migration script.
We have been successfully using it to convert an existing Bugzilla 3.4-Installation
to Redmine 0.8.x and the current Redmine trunk.You can find the script here: http://github.com/ralli/bz2redmine
Hi Ralph,
I've encountered certain issues after I tried to migrate data from Bugzilla to Redmine using this script:
- Values from custom URL field are not migrated;
- References to duplicated items have been imported in reverse order (have opposite meaning);
- Dependencies have been imported in reverse order (have opposite meaning);
- Categories are not imported;
- Watchers are not imported;
- Target Version field has wrong mapping. It is mapped to Version field instead of Target Milestone;
- Verified item in bugzilla has "In progress" status in redmine;
- Groups are not migrated;
- User->Group relations are not migrated;
- Project->Member relations are not migrated;
- User name and surename are mixed up.Attached files contain respective fixes for the issues above. Also, few more minor issues have been resolved as well. You may try to migrate the data using the attached files and going closely to the following scenario:
1. Execute the attached bz2redmine.rb migration script;
2. Ensure the migration script have been performed with no errors;
3. Grant administrator permissions to certain users. In this particular case for users with 1, 13 ids;
update users set admin = true where id in (1, 13);
4. Activate products:
update projects set status = 1, lft = 1, rgt = 2 where id = 1; -- Project 1
update projects set status = 1, lft = 3, rgt = 4 where id = 2; -- Project 2
update projects set status = 1, lft = 5, rgt = 6 where id = 3; -- Project 3
update projects set status = 1, lft = 7, rgt = 8 where id = 4; -- Project 4
update projects set status = 1, lft = 9, rgt = 10 where id = 5; -- Project 5
update projects set status = 1, lft = 11, rgt = 12 where id = 6; -- Project 6
update projects set status = 1, lft = 13, rgt = 14 where id = 7; -- Project 7Finally, the data has been successfully migrated. Hope it will help to someone.
Thanks, Alex
Hello Alex,
I've been merging your changes into the github repository.
Thanks, Ralph
Updated by Eugene Dzhurinsky over 14 years ago
I tried to migrate database from existing Bugzilla installation (version 3.2.6) to Redmine (0.9.3)
Import script gives me the following output
#<Mysql::Error: Column 'tracker_id' cannot be null>
./bz2redmine.rb:428:in `execute'
./bz2redmine.rb:428:in `red_exec_sql'
./bz2redmine.rb:306:in `migrate_issues'
./bz2redmine.rb:420:in `bz_select_sql'
./bz2redmine.rb:273:in `migrate_issues'
./bz2redmine.rb:71:in `migrate'
./bz2redmine.rb:445
And looks like database is not consistent - many pages are giving errors, and Bugzilla users can't login with their passwords.
Updated by Ralph Juhnke over 14 years ago
Eugene Dzhurinsky wrote:
I tried to migrate database from existing Bugzilla installation (version 3.2.6) to Redmine (0.9.3)
Import script gives me the following output
#<Mysql::Error: Column 'tracker_id' cannot be null>
./bz2redmine.rb:428:in `execute'
./bz2redmine.rb:428:in `red_exec_sql'
./bz2redmine.rb:306:in `migrate_issues'
./bz2redmine.rb:420:in `bz_select_sql'
./bz2redmine.rb:273:in `migrate_issues'
./bz2redmine.rb:71:in `migrate'
./bz2redmine.rb:445And looks like database is not consistent - many pages are giving errors, and Bugzilla users can't login with their passwords.
You seem to have translated "bug severities" others than ( "critical", ..., "enhancement") in your bugzilla database. Can you check this?
The users passwords are not migrated (technically this is not feasible). You can set the hashed_password field to the SHA1-Value of
a known password (9a8115635967289d72f8b21827b21e568971464f for "bugzilla").
Updated by Eugene Dzhurinsky over 14 years ago
You seem to have translated "bug severities" others than ( "critical", ..., "enhancement") in your bugzilla database. Can you check this?
The users passwords are not migrated (technically this is not feasible). You can set the hashed_password field to the SHA1-Value of
a known password (9a8115635967289d72f8b21827b21e568971464f for "bugzilla").
select * from bug_severity; +----+-------------+---------+----------+ | id | value | sortkey | isactive | +----+-------------+---------+----------+ | 1 | blocker | 100 | 1 | | 2 | critical | 200 | 1 | | 3 | major | 300 | 1 | | 4 | normal | 400 | 1 | | 5 | minor | 500 | 1 | | 6 | trivial | 600 | 1 | | 7 | enhancement | 700 | 1 | +----+-------------+---------+----------+
Updated by Ralph Juhnke over 14 years ago
Eugene Dzhurinsky wrote:
You seem to have translated "bug severities" others than ( "critical", ..., "enhancement") in your bugzilla database. Can you check this?
The users passwords are not migrated (technically this is not feasible). You can set the hashed_password field to the SHA1-Value of
a known password (9a8115635967289d72f8b21827b21e568971464f for "bugzilla").[...]
Your data is correct :-)
Then we have two options:
1. Can you check, if there are bug severities in your bugs table wich do not match these bug severities? "select distinct bug_severity from bugs" (or so).
2. change the line "tracker_id = @issueTrackers[bug_severity]" to "tracker_id = @issueTrackers[bug_severity] || 1". This will assume all bugs with invalid severities are "bugs".
Updated by Eugene Dzhurinsky over 14 years ago
Ralph Juhnke wrote:
Your data is correct :-)Then we have two options:
1. Can you check, if there are bug severities in your bugs table wich do not match these bug severities? "select distinct bug_severity from bugs" (or so).
2. change the line "tracker_id = @issueTrackers[bug_severity]" to "tracker_id = @issueTrackers[bug_severity] || 1". This will assume all bugs with invalid severities are "bugs".
Well, I used option 2, and I was able to import things into database. Looks like most of redmine pages are working well now.
However when I navigate to http://redmine:3000/admin/projects and choose "All" from dropdown list, I am getting the error:
Processing AdminController#projects (for 89.162.215.37 at 2010-04-23 09:33:43) [GET] Parameters: {"name"=>"", "action"=>"projects", "controller"=>"admin", "status"=>""} Rendering template within layouts/admin Rendering admin/projects ActionView::TemplateError (undefined method `-' for nil:NilClass) on line #29 of app/views/admin/projects.rhtml: 26: </tr></thead> 27: <tbody> 28: <% for project in @projects %> 29: <tr class="<%= cycle("odd", "even") %> <%= css_project_classes(project) %>"> 30: <td class="name" style="padding-left: <%= project.level %>em;"><%= project.active? ? link_to(h(project.name), :controller => 'projects', :action => 'settings', :id => project) : h(project.name) %></td> 31: <td><%= textilizable project.short_description, :project => project %></td> 32: <td align="center"><%= image_tag 'true.png' if project.is_public? %></td> app/helpers/admin_helper.rb:28:in `css_project_classes' app/views/admin/projects.rhtml:29:in `_run_rhtml_app47views47admin47projects46rhtml' app/views/admin/projects.rhtml:28:in `each' app/views/admin/projects.rhtml:28:in `_run_rhtml_app47views47admin47projects46rhtml' /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start' Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)
Updated by Ralph Juhnke over 14 years ago
Eugene Dzhurinsky wrote:
Ralph Juhnke wrote:
Your data is correct :-)Then we have two options:
1. Can you check, if there are bug severities in your bugs table wich do not match these bug severities? "select distinct bug_severity from bugs" (or so).
2. change the line "tracker_id = @issueTrackers[bug_severity]" to "tracker_id = @issueTrackers[bug_severity] || 1". This will assume all bugs with invalid severities are "bugs".Well, I used option 2, and I was able to import things into database. Looks like most of redmine pages are working well now.
However when I navigate to http://redmine:3000/admin/projects and choose "All" from dropdown list, I am getting the error:
[...]
Hi Eugene,
i (hopefully) fixed this problem. can you download and try the version at github?
the url is: http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b
Updated by Eugene Dzhurinsky over 14 years ago
Ralph Juhnke wrote:
Hi Eugene,
i (hopefully) fixed this problem. can you download and try the version at github?
the url is: http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b
Hello, Ralph!
Thank you very much for the fix, now I can see the whole list of projects and able to change the status etc. However there are still some errors detected when trying to review the project activity.
NoMethodError (undefined method `find_new_statuses_allowed_to' for nil:NilClass):
app/models/issue.rb:300:in `new_statuses_allowed_to'
app/controllers/issues_controller.rb:112:in `show'
/usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib64/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib64/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib64/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:82:in `start'
Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)
I will try to gather all errors in redmine after the data import from Bugzilla, and post them all at once, but it may take some time.
Updated by Ralph Juhnke over 14 years ago
Eugene Dzhurinsky wrote:
Ralph Juhnke wrote:
Hi Eugene,
i (hopefully) fixed this problem. can you download and try the version at github?
the url is: http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b
Hello, Ralph!
Thank you very much for the fix, now I can see the whole list of projects and able to change the status etc. However there are still some errors detected when trying to review the project activity.
NoMethodError (undefined method `find_new_statuses_allowed_to' for nil:NilClass):
app/models/issue.rb:300:in `new_statuses_allowed_to'
app/controllers/issues_controller.rb:112:in `show'
/usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/lib64/ruby/1.8/webrick/server.rb:162:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/lib64/ruby/1.8/webrick/server.rb:95:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:92:in `each'
/usr/lib64/ruby/1.8/webrick/server.rb:92:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:23:in `start'
/usr/lib64/ruby/1.8/webrick/server.rb:82:in `start'Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)
I will try to gather all errors in redmine after the data import from Bugzilla, and post them all at once, but it may take some time.
Hi Eugene,
I suspect, you just need to add a new issue status "Reopened" to your redmine configuration since
Bugzilla has a reopened bug status and redmine does not by default.
If that does not work, check out the latest version from the github repository (tp://github.com/ralli/bz2redmine). Please note that I made changes to settings.rb.example.
Updated by Eugene Dzhurinsky over 14 years ago
Ralph Juhnke wrote:
Hi Eugene,
I suspect, you just need to add a new issue status "Reopened" to your redmine configuration since
Bugzilla has a reopened bug status and redmine does not by default.If that does not work, check out the latest version from the github repository (tp://github.com/ralli/bz2redmine). Please note that I made changes to settings.rb.example.
Hello, Ralph!
Well, for some reason the migration script doesn't work anymore. I updated settings.rb with "minor" option for severity, and now I'm getting the following error:
./bz2redmine.rb opening #<ConnectionInfo:0x2b2bdd727070 @dbname="bugzilla", @password="secret", @user="bugzilla", @host="localhost"> opening #<ConnectionInfo:0x2b2bdd727048 @dbname="redmine", @password="secret", @user="redmine", @host="localhost"> checking bug priorities... bugzilla: select bug_id, priority from bugs where priority not in ('P1', 'P2', 'P3', 'P4', 'P5') args= checking bug status... bugzilla: select bug_id, bug_status from bugs where bug_status not in ('NEW', 'VERIFIED', 'RESOLVED', 'ASSIGNED', 'REOPENED', 'UNCONFIRMED', 'CLOSED') args= checking bug status... bugzilla: select bug_id, bug_severity from bugs where bug_severity not in ('normal', 'trivial', 'critical', 'enhancement', 'major', 'minimal', 'blocker', 'minor') args= redmine: select id from trackers where id=? args=1 #<NameError: uncaught throw `cannot find tracker in trackers table with id 1'> ./bz2redmine.rb:538:in `throw' ./bz2redmine.rb:538:in `verify_trackers' ./bz2redmine.rb:536:in `each' ./bz2redmine.rb:536:in `verify_trackers' ./bz2redmine.rb:464:in `perform_sanity_checks' ./bz2redmine.rb:66:in `migrate' ./bz2redmine.rb:563
There's definitely nothing about tracker with id 1 in trackers.
Updated by Ralph Juhnke over 14 years ago
Eugene Dzhurinsky wrote:
Ralph Juhnke wrote:
Hi Eugene,
I suspect, you just need to add a new issue status "Reopened" to your redmine configuration since
Bugzilla has a reopened bug status and redmine does not by default.If that does not work, check out the latest version from the github repository (tp://github.com/ralli/bz2redmine). Please note that I made changes to settings.rb.example.
Hello, Ralph!
Well, for some reason the migration script doesn't work anymore. I updated settings.rb with "minor" option for severity, and now I'm getting the following error:
[...]
There's definitely nothing about tracker with id 1 in trackers.
Hi Eugene,
i have been adding some sanity checks to the script. The reason for some of the last problem were some database inconsistencies. Now I try to check for some of the possible inconsistencies to prevent these
kinds of problems.
The script should work if you start with a new redmine database and run the "rake redmine:load_default_data" task.
I think, we should start a new thread on the help-forum. The history of this patch request is getting a bit lenghy and I do not expect the bz2redmine script to be accepted as patch for redmine (the migrate_from_bugzilla task would have better chances to be accepted).
And by the way. Thank you for your patience and your testing effords.
Hope that helps
Ralph
Updated by Szilard Pall almost 14 years ago
Hi Everyone!
We're planning to migrate from bugzilla to redmine and I'd like to make sure that we don't start before knowing what and how to do. Most importantly what versions are known to be compatible with the current version of the scipt? Our bugzilla is very outdated (v2.x) so I'm pretty sure we first anyway have to upgrade to a fairly recent version. So it might as well make things easier to pick a version that is known to be compatible.
Also, are there any common pitfalls that are good to know about in order to avoid unnecessary headache?
Thanks,
Szilard
Updated by Ralph Juhnke almost 14 years ago
We have been converting from Bugzilla 2.2 (i suppose) to redmine 0.9.x.
Since the scripts work with a current bugzilla version (currently i am testing with 3.6) it will be necessary to
upgrade your bugzilla installation. The upgrade was not too complicated, we had some issues regarding foreign
key constraint violations. Additionally we had to convert the character set from latin1 to utf8.
The current scripts work with a current version of redmine (1.0.2).
Updated by Szilard Pall almost 14 years ago
Thanks for the tips, Ralph!
I'm as newbie as it gets when it comes to ruby and that might be the reason why I got stuck. I have everything in place, but the script seems to fail even before touching the db:
$ rake redmine:migrate_from_bugzilla RAILS_ENV="test" --trace (in /opt/redmine/redmine-1.0.2) ** Invoke redmine:migrate_from_bugzilla (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute redmine:migrate_from_bugzilla rake aborted! undefined method `is_closed=' for nil:NilClass /opt/redmine/redmine-1.0.2/vendor/rails/activesupport/lib/active_support/whiny_nil.rb:52:in `method_missing' /opt/redmine/redmine-1.0.2/lib/tasks/migrate_from_bugzilla.rake:64 /usr/lib/ruby/1.8/rake.rb:636:in `call' /usr/lib/ruby/1.8/rake.rb:636:in `execute' /usr/lib/ruby/1.8/rake.rb:631:in `each' /usr/lib/ruby/1.8/rake.rb:631:in `execute' /usr/lib/ruby/1.8/rake.rb:597:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/1.8/rake.rb:590:in `invoke_with_call_chain' /usr/lib/ruby/1.8/rake.rb:583:in `invoke' /usr/lib/ruby/1.8/rake.rb:2051:in `invoke_task' /usr/lib/ruby/1.8/rake.rb:2029:in `top_level' /usr/lib/ruby/1.8/rake.rb:2029:in `each' /usr/lib/ruby/1.8/rake.rb:2029:in `top_level' /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:2023:in `top_level' /usr/lib/ruby/1.8/rake.rb:2001:in `run' /usr/lib/ruby/1.8/rake.rb:2068:in `standard_exception_handling' /usr/lib/ruby/1.8/rake.rb:1998:in `run' /usr/bin/rake:28
Any idea what could be wrong?
Updated by Ralph Juhnke almost 14 years ago
Szilard Pall wrote:
Thanks for the tips, Ralph!
I'm as newbie as it gets when it comes to ruby and that might be the reason why I got stuck. I have everything in place, but the script seems to fail even before touching the db:
[...]Any idea what could be wrong?
Looks like there are no issue statuses in your redmine database or there are different position attributes assigned to them.
Have you been running the redmine:load_initial_data rake task before starting the migration?
Updated by Szilard Pall almost 14 years ago
Ralph Juhnke wrote:
Szilard Pall wrote:
Thanks for the tips, Ralph!
I'm as newbie as it gets when it comes to ruby and that might be the reason why I got stuck. I have everything in place, but the script seems to fail even before touching the db:
[...]Any idea what could be wrong?
Looks like there are no issue statuses in your redmine database or there are different position attributes assigned to them.
Have you been running the redmine:load_initial_data rake task before starting the migration?
No, I didn't run that. Stupid mistake, thanks for pointing it out!
Updated by Brian Lindahl over 13 years ago
- File bugzilla-1.0.4.patch bugzilla-1.0.4.patch added
I've taken the originally attached patch and have made improvements and bug fixes. Here's the version that I used.
Note that this takes advantage of the 'found_version' patch found in #7443 (a custom field would be another option, but would require editing)
Updated by Matej Kenda over 12 years ago
I have a situation where bugs are moved to Redmine selectively.
I created helper for Redmine for that. The script is based on migrate_from_bugzilla Rake task.