https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292009-05-21T15:47:38ZRedmineRedmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=94352009-05-21T15:47:38ZBernie Telles
<ul></ul><p>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?<br />Here's the error:</p>
<p>Migrating profiles..<br />Migrating products.<br />rake aborted!<br />compile error<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1912: syntax error, unexpected tINTEGER<br />BugzillaMigrate::0<br /> ^<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1912:in `compute_type'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1432:in `instantiate'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:586:in `find_by_sql'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:586:in `collect!'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:586:in `find_by_sql'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1345:in `find_every'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:1307:in `find_initial'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/base.rb:538:in `find'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:47:in `find'<br />/usr/lib/ruby/gems/1.8/gems/activerecord-2.1.2/lib/active_record/associations/association_collection.rb:54:in `first'<br />/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:269:in `migrate'<br />/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:264:in `each'<br />/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:264:in `migrate'<br />/cygdrive/c/development/redmine/redmine-0.8/lib/tasks/migrate_from_bugzilla.rake:344<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:636:in `call'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:636:in `execute'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:631:in `each'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:631:in `execute'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:597:in `invoke_with_call_chain'<br />/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:590:in `invoke_with_call_chain'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:583:in `invoke'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2047:in `invoke_task'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2025:in `top_level'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2025:in `each'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2025:in `top_level'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2064:in `standard_exception_handling'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2019:in `top_level'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1997:in `run'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:2064:in `standard_exception_handling'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/lib/rake.rb:1994:in `run'<br />/usr/lib/ruby/gems/1.8/gems/rake-0.8.6/bin/rake:31<br />/usr/bin/rake:19:in `load'<br />/usr/bin/rake:19<br />Migrating bugs</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=111642009-09-28T21:23:32ZRalph Juhnke
<ul></ul><p>I created another migration script.</p>
<p>We have been successfully using it to convert an existing Bugzilla 3.4-Installation <br />to Redmine 0.8.x and the current Redmine trunk.</p>
<p>You can find the script here: <a class="external" href="http://github.com/ralli/bz2redmine">http://github.com/ralli/bz2redmine</a></p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=127782009-12-07T18:14:17ZEric Davis
<ul><li><strong>Category</strong> set to <i>Importers</i></li></ul> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=145402010-02-19T19:36:19ZRalph Juhnke
<ul></ul><p>I have been adapting Arjen Roodselaars migrate_from_bugzilla task to work with current versions of Redmine and Bugzilla.</p>
<p>The task now migrates attachments and relations between bugs.</p>
<p>I've been testing it to convert a Bugzilla 3.4.x database to Redmine 0.8.x and 0.9.</p>
<p>You can find the sources here: <a class="external" href="http://github.com/ralli/migrate_from_bugzilla">http://github.com/ralli/migrate_from_bugzilla</a>.</p>
<p>I would appreciate any feedback, if it worked.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=145982010-02-22T22:35:13ZSteven Friedman
<ul></ul><p>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?</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=146882010-02-25T17:46:07ZDaniel Beland
<ul></ul><p>Ralph Juhnke wrote:</p>
<blockquote>
<p>I would appreciate any feedback, if it worked.</p>
</blockquote>
<p>Hi Ralph,</p>
<p>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. <br />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!</p>
<p>Thanks!</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=148522010-03-02T22:05:51ZRalph Juhnke
<ul></ul><p>Daniel Beland wrote:</p>
<blockquote>
<p>Ralph Juhnke wrote:</p>
<blockquote>
<p>I would appreciate any feedback, if it worked.</p>
</blockquote>
<p>Hi Ralph,</p>
<p>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. <br />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!</p>
<p>Thanks!</p>
</blockquote>
<p>Hello Daniel,<br />thank you for your reply. the import should work now.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=148532010-03-02T22:09:54ZRalph Juhnke
<ul></ul><p>Steven Friedman wrote:</p>
<blockquote>
<p>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?</p>
</blockquote>
<p>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.).<br />Currently it will copy all bugs and not just the open ones.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=156672010-04-06T21:17:16ZAlexander Zhovnuvaty
<ul><li><strong>File</strong> <a href="/attachments/3523">bz2redmine.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3523/bz2redmine.rb">bz2redmine.rb</a> added</li><li><strong>File</strong> <a href="/attachments/3524">settings.rb</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3524/settings.rb">settings.rb</a> added</li></ul><p>Ralph Juhnke wrote:</p>
<blockquote>
<p>I created another migration script.</p>
<p>We have been successfully using it to convert an existing Bugzilla 3.4-Installation <br />to Redmine 0.8.x and the current Redmine trunk.</p>
<p>You can find the script here: <a class="external" href="http://github.com/ralli/bz2redmine">http://github.com/ralli/bz2redmine</a></p>
</blockquote>
<p>Hi Ralph,</p>
<p>I've encountered certain issues after I tried to migrate data from Bugzilla to Redmine using this script:<br />- Values from custom URL field are not migrated;<br />- References to duplicated items have been imported in reverse order (have opposite meaning);<br />- Dependencies have been imported in reverse order (have opposite meaning);<br />- Categories are not imported;<br />- Watchers are not imported;<br />- Target Version field has wrong mapping. It is mapped to Version field instead of Target Milestone;<br />- Verified item in bugzilla has "In progress" status in redmine;<br />- Groups are not migrated;<br />- User->Group relations are not migrated;<br />- Project->Member relations are not migrated;<br />- User name and surename are mixed up.</p>
<p>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:</p>
<p>1. Execute the attached bz2redmine.rb migration script;<br />2. Ensure the migration script have been performed with no errors;<br />3. Grant administrator permissions to certain users. In this particular case for users with 1, 13 ids;<br />update users set admin = true where id in (1, 13);<br />4. Activate products:<br />update projects set status = 1, lft = 1, rgt = 2 where id = 1; -- Project 1<br />update projects set status = 1, lft = 3, rgt = 4 where id = 2; -- Project 2<br />update projects set status = 1, lft = 5, rgt = 6 where id = 3; -- Project 3<br />update projects set status = 1, lft = 7, rgt = 8 where id = 4; -- Project 4<br />update projects set status = 1, lft = 9, rgt = 10 where id = 5; -- Project 5<br />update projects set status = 1, lft = 11, rgt = 12 where id = 6; -- Project 6<br />update projects set status = 1, lft = 13, rgt = 14 where id = 7; -- Project 7</p>
<p>Finally, the data has been successfully migrated. Hope it will help to someone.</p>
<p>Thanks, Alex</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=157642010-04-11T13:54:41ZRalph Juhnke
<ul></ul><p>Alexander Zhovnuvaty wrote:</p>
<blockquote>
<p>Ralph Juhnke wrote:</p>
<blockquote>
<p>I created another migration script.</p>
<p>We have been successfully using it to convert an existing Bugzilla 3.4-Installation <br />to Redmine 0.8.x and the current Redmine trunk.</p>
<p>You can find the script here: <a class="external" href="http://github.com/ralli/bz2redmine">http://github.com/ralli/bz2redmine</a></p>
</blockquote>
<p>Hi Ralph,</p>
<p>I've encountered certain issues after I tried to migrate data from Bugzilla to Redmine using this script:<br />- Values from custom URL field are not migrated;<br />- References to duplicated items have been imported in reverse order (have opposite meaning);<br />- Dependencies have been imported in reverse order (have opposite meaning);<br />- Categories are not imported;<br />- Watchers are not imported;<br />- Target Version field has wrong mapping. It is mapped to Version field instead of Target Milestone;<br />- Verified item in bugzilla has "In progress" status in redmine;<br />- Groups are not migrated;<br />- User->Group relations are not migrated;<br />- Project->Member relations are not migrated;<br />- User name and surename are mixed up.</p>
<p>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:</p>
<p>1. Execute the attached bz2redmine.rb migration script;<br />2. Ensure the migration script have been performed with no errors;<br />3. Grant administrator permissions to certain users. In this particular case for users with 1, 13 ids;<br />update users set admin = true where id in (1, 13);<br />4. Activate products:<br />update projects set status = 1, lft = 1, rgt = 2 where id = 1; -- Project 1<br />update projects set status = 1, lft = 3, rgt = 4 where id = 2; -- Project 2<br />update projects set status = 1, lft = 5, rgt = 6 where id = 3; -- Project 3<br />update projects set status = 1, lft = 7, rgt = 8 where id = 4; -- Project 4<br />update projects set status = 1, lft = 9, rgt = 10 where id = 5; -- Project 5<br />update projects set status = 1, lft = 11, rgt = 12 where id = 6; -- Project 6<br />update projects set status = 1, lft = 13, rgt = 14 where id = 7; -- Project 7</p>
<p>Finally, the data has been successfully migrated. Hope it will help to someone.</p>
<p>Thanks, Alex</p>
</blockquote>
<p>Hello Alex,</p>
<p>I've been merging your changes into the github repository.</p>
<p>Thanks, Ralph</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=159462010-04-17T14:37:24ZEugene Dzhurinsky
<ul></ul><p>I tried to migrate database from existing Bugzilla installation (version 3.2.6) to Redmine (0.9.3)</p>
<p>Import script gives me the following output</p>
<p>#<Mysql::Error: Column 'tracker_id' cannot be null><br />./bz2redmine.rb:428:in `execute'<br />./bz2redmine.rb:428:in `red_exec_sql'<br />./bz2redmine.rb:306:in `migrate_issues'<br />./bz2redmine.rb:420:in `bz_select_sql'<br />./bz2redmine.rb:273:in `migrate_issues'<br />./bz2redmine.rb:71:in `migrate'<br />./bz2redmine.rb:445</p>
<p>And looks like database is not consistent - many pages are giving errors, and Bugzilla users can't login with their passwords.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=159752010-04-18T22:29:52ZRalph Juhnke
<ul></ul><p>Eugene Dzhurinsky wrote:</p>
<blockquote>
<p>I tried to migrate database from existing Bugzilla installation (version 3.2.6) to Redmine (0.9.3)</p>
<p>Import script gives me the following output</p>
<p>#<Mysql::Error: Column 'tracker_id' cannot be null><br />./bz2redmine.rb:428:in `execute'<br />./bz2redmine.rb:428:in `red_exec_sql'<br />./bz2redmine.rb:306:in `migrate_issues'<br />./bz2redmine.rb:420:in `bz_select_sql'<br />./bz2redmine.rb:273:in `migrate_issues'<br />./bz2redmine.rb:71:in `migrate'<br />./bz2redmine.rb:445</p>
<p>And looks like database is not consistent - many pages are giving errors, and Bugzilla users can't login with their passwords.</p>
</blockquote>
<p>You seem to have translated "bug severities" others than ( "critical", ..., "enhancement") in your bugzilla database. Can you check this?<br />The users passwords are not migrated (technically this is not feasible). You can set the hashed_password field to the SHA1-Value of <br />a known password (9a8115635967289d72f8b21827b21e568971464f for "bugzilla").</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=159802010-04-19T07:08:22ZEugene Dzhurinsky
<ul></ul><blockquote>
<p>You seem to have translated "bug severities" others than ( "critical", ..., "enhancement") in your bugzilla database. Can you check this?<br />The users passwords are not migrated (technically this is not feasible). You can set the hashed_password field to the SHA1-Value of <br />a known password (9a8115635967289d72f8b21827b21e568971464f for "bugzilla").</p>
</blockquote>
<pre>
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 |
+----+-------------+---------+----------+</pre> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=161032010-04-22T22:27:23ZRalph Juhnke
<ul></ul><p>Eugene Dzhurinsky wrote:</p>
<blockquote><blockquote>
<p>You seem to have translated "bug severities" others than ( "critical", ..., "enhancement") in your bugzilla database. Can you check this?<br />The users passwords are not migrated (technically this is not feasible). You can set the hashed_password field to the SHA1-Value of <br />a known password (9a8115635967289d72f8b21827b21e568971464f for "bugzilla").</p>
</blockquote>
<p>[...]</p>
</blockquote>
<p>Your data is correct :-)</p>
<p>Then we have two options:</p>
<p>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).<br />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".</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=161102010-04-23T07:31:01ZEugene Dzhurinsky
<ul></ul><blockquote>
<p>Ralph Juhnke wrote:<br />Your data is correct :-)</p>
<p>Then we have two options:</p>
<p>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).<br />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".</p>
</blockquote>
<p>Well, I used option 2, and I was able to import things into database. Looks like most of redmine pages are working well now.</p>
<p>However when I navigate to <a class="external" href="http://redmine:3000/admin/projects">http://redmine:3000/admin/projects</a> and choose "All" from dropdown list, I am getting the error:</p>
<pre>
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)</pre> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=162492010-04-28T22:24:09ZRalph Juhnke
<ul></ul><p>Eugene Dzhurinsky wrote:</p>
<blockquote><blockquote>
<p>Ralph Juhnke wrote:<br />Your data is correct :-)</p>
<p>Then we have two options:</p>
<p>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).<br />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".</p>
</blockquote>
<p>Well, I used option 2, and I was able to import things into database. Looks like most of redmine pages are working well now.</p>
<p>However when I navigate to <a class="external" href="http://redmine:3000/admin/projects">http://redmine:3000/admin/projects</a> and choose "All" from dropdown list, I am getting the error:</p>
<p>[...]</p>
</blockquote>
<p>Hi Eugene,</p>
<p>i (hopefully) fixed this problem. can you download and try the version at github?</p>
<p>the url is: <a class="external" href="http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b">http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b</a></p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=162542010-04-29T07:17:49ZEugene Dzhurinsky
<ul></ul><p>Ralph Juhnke wrote:</p>
<blockquote>
<p>Hi Eugene,</p>
<p>i (hopefully) fixed this problem. can you download and try the version at github?</p>
<p>the url is: <a class="external" href="http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b">http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b</a></p>
</blockquote>
<p>Hello, Ralph!</p>
<p>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.</p>
<p>NoMethodError (undefined method `find_new_statuses_allowed_to' for nil:NilClass):<br /> app/models/issue.rb:300:in `new_statuses_allowed_to'<br /> app/controllers/issues_controller.rb:112:in `show'<br /> /usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service'<br /> /usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:95:in `start'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:92:in `each'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:92:in `start'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:23:in `start'<br /> /usr/lib64/ruby/1.8/webrick/server.rb:82:in `start'</p>
<p>Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)</p>
<p>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.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=163622010-05-02T22:02:31ZRalph Juhnke
<ul></ul><p>Eugene Dzhurinsky wrote:</p>
<blockquote>
<p>Ralph Juhnke wrote:</p>
<blockquote>
<p>Hi Eugene,</p>
<p>i (hopefully) fixed this problem. can you download and try the version at github?</p>
<p>the url is: <a class="external" href="http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b">http://github.com/ralli/bz2redmine/archives/fda568e871724f4961a6f65b498103ebf7cb0c6b</a></p>
</blockquote>
<p>Hello, Ralph!</p>
<p>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.</p>
<p>NoMethodError (undefined method `find_new_statuses_allowed_to' for nil:NilClass):<br />app/models/issue.rb:300:in `new_statuses_allowed_to'<br />app/controllers/issues_controller.rb:112:in `show'<br />/usr/lib64/ruby/1.8/webrick/httpserver.rb:104:in `service'<br />/usr/lib64/ruby/1.8/webrick/httpserver.rb:65:in `run'<br />/usr/lib64/ruby/1.8/webrick/server.rb:173:in `start_thread'<br />/usr/lib64/ruby/1.8/webrick/server.rb:162:in `start'<br />/usr/lib64/ruby/1.8/webrick/server.rb:162:in `start_thread'<br />/usr/lib64/ruby/1.8/webrick/server.rb:95:in `start'<br />/usr/lib64/ruby/1.8/webrick/server.rb:92:in `each'<br />/usr/lib64/ruby/1.8/webrick/server.rb:92:in `start'<br />/usr/lib64/ruby/1.8/webrick/server.rb:23:in `start'<br />/usr/lib64/ruby/1.8/webrick/server.rb:82:in `start'</p>
<p>Rendering /var/lib/redmine/public/500.html (500 Internal Server Error)</p>
<p>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.</p>
</blockquote>
<p>Hi Eugene,</p>
<p>I suspect, you just need to add a new issue status "Reopened" to your redmine configuration since <br />Bugzilla has a reopened bug status and redmine does not by default.</p>
<p>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.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=164022010-05-04T09:22:22ZEugene Dzhurinsky
<ul></ul><p>Ralph Juhnke wrote:</p>
<blockquote>
<p>Hi Eugene,</p>
<p>I suspect, you just need to add a new issue status "Reopened" to your redmine configuration since <br />Bugzilla has a reopened bug status and redmine does not by default.</p>
<p>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.</p>
</blockquote>
<p>Hello, Ralph!</p>
<p>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:</p>
<pre>./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</pre>
<p>There's definitely nothing about tracker with id 1 in trackers.</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=164282010-05-04T21:07:26ZRalph Juhnke
<ul></ul><p>Eugene Dzhurinsky wrote:</p>
<blockquote>
<p>Ralph Juhnke wrote:</p>
<blockquote>
<p>Hi Eugene,</p>
<p>I suspect, you just need to add a new issue status "Reopened" to your redmine configuration since <br />Bugzilla has a reopened bug status and redmine does not by default.</p>
<p>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.</p>
</blockquote>
<p>Hello, Ralph!</p>
<p>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:</p>
<p>[...]</p>
<p>There's definitely nothing about tracker with id 1 in trackers.</p>
</blockquote>
<p>Hi Eugene,</p>
<p>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 <br />kinds of problems.</p>
<p>The script should work if you start with a new redmine database and run the "rake redmine:load_default_data" task.</p>
<p>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).</p>
<p>And by the way. Thank you for your patience and your testing effords.</p>
<p>Hope that helps</p>
<p>Ralph</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=213692010-10-14T01:19:09ZSzilard Pall
<ul></ul><p>Hi Everyone!</p>
<p>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 <em>are known</em> 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.</p>
<p>Also, are there any common pitfalls that are good to know about in order to avoid unnecessary headache?</p>
<p>Thanks,<br />Szilard</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=215972010-10-20T17:55:04ZRalph Juhnke
<ul></ul><p>We have been converting from Bugzilla 2.2 (i suppose) to redmine 0.9.x.<br />Since the scripts work with a current bugzilla version (currently i am testing with 3.6) it will be necessary to <br />upgrade your bugzilla installation. The upgrade was not too complicated, we had some issues regarding foreign <br />key constraint violations. Additionally we had to convert the character set from latin1 to utf8.<br />The current scripts work with a current version of redmine (1.0.2).</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=221082010-11-03T22:26:30ZSzilard Pall
<ul></ul><p>Thanks for the tips, Ralph!</p>
<p>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: <br /><pre>
$ 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
</pre></p>
<p>Any idea what could be wrong?</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=221612010-11-04T19:28:13ZRalph Juhnke
<ul></ul><p>Szilard Pall wrote:</p>
<blockquote>
<p>Thanks for the tips, Ralph!</p>
<p>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: <br />[...]</p>
<p>Any idea what could be wrong?</p>
</blockquote>
<p>Looks like there are no issue statuses in your redmine database or there are different position attributes assigned to them.</p>
<p>Have you been running the redmine:load_initial_data rake task before starting the migration?</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=221622010-11-04T19:51:41ZSzilard Pall
<ul></ul><p>Ralph Juhnke wrote:</p>
<blockquote>
<p>Szilard Pall wrote:</p>
<blockquote>
<p>Thanks for the tips, Ralph!</p>
<p>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: <br />[...]</p>
<p>Any idea what could be wrong?</p>
</blockquote>
<p>Looks like there are no issue statuses in your redmine database or there are different position attributes assigned to them.</p>
<p>Have you been running the redmine:load_initial_data rake task before starting the migration?</p>
</blockquote>
<p>No, I didn't run that. Stupid mistake, thanks for pointing it out!</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=244762011-01-25T19:05:51ZBrian Lindahl
<ul><li><strong>File</strong> <a href="/attachments/5207">bugzilla-1.0.4.patch</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/5207/bugzilla-1.0.4.patch">bugzilla-1.0.4.patch</a> added</li></ul><p>I've taken the originally attached patch and have made improvements and bug fixes. Here's the version that I used.</p>
<p>Note that this takes advantage of the 'found_version' patch found in <a class="issue tracker-3 status-5 priority-4 priority-default closed" title="Patch: Found-in-version patch (Closed)" href="https://www.redmine.org/issues/7443">#7443</a> (a custom field would be another option, but would require editing)</p> Redmine - Patch #989: Migration task from Bugzillahttps://www.redmine.org/issues/989?journal_id=352432012-01-09T12:43:34ZMatej Kenda
<ul></ul><p>I have a situation where bugs are moved to Redmine selectively.</p>
<p>I created helper for Redmine for that. The script is based on migrate_from_bugzilla Rake task.</p>
<p><a class="external" href="https://github.com/matejk/bugzilla_to_redmine">https://github.com/matejk/bugzilla_to_redmine</a></p>