Pivotal2Redmie is a simple collection of scripts (actually just one script and two configuration files) that allow you to migrate your issues in Pivotal Tracker to the Redmine issue tracker.
The scripts are simple and only basic information is imported. It assumes that all the users, the project and the status you require are already created in Redmine and uses a mapping file to determine the relation between a Pivotal item and the Redmine data.
You’ll need PHP CLI, an existing MySQL database with a valid Redmine installation, including all the users already created, custom fields (only "labels" are supported), projects, trackers and issue statuses.
Create a config.php and a mappings.php file by copying the existing examples. Change the settings to the those used by your system and save the files.
Place the exported CSV in the same folder as the script and run it:
php p2r.php <project ID> <csv file>
After successful execution you’re database will contain the new issues in Redmine.
-
The rgt, root_id and lft fields that are used by Redmine to create a tree hierarchy are set to null.
-
Iteration values, dates and other data that has no direct conversion path is ignored.
-
Comments in Pivotal Tracker export file don’t contain the hour, so when imported, all changes have only the day.
-
The script could be extended to handle non-existing data as it is simple enough but I have no intention of doing so.
Due to having injected the data directly into the database without properly using the rgt, root_id and lft fields, you may experience a server error when trying to access any page that uses issues directly (Issues tab or Gantt tab are two examples).
To solve it, from inside redmine’s installation folder run:
RAILS_ENV=production script/rails console
In the console that opens issue the following command, as is:
Issue.rebuild!
You should now have access to the database. In the future this may be changed as Pivotal Tracked doesn’t have any feature/chore hierarchy so it should be safe to set root_id to NULL, and rgt and lft fields to 1 and 2.
One other problem with the issues table is that the created_on field must contain a valid MySQL data string, so no 0000-00-00 or other invalid value, if you still have server errors on issue pages, check this field.
This project is licensed under the GNU Public License.
You are free to use, adapt and distribute as long as you comply to the license.