Skip to content
This repository was archived by the owner on Aug 1, 2021. It is now read-only.
/ pivotal2redmine Public archive

Simple PHP script that tries to import CSV files with Pivotal Tracker issues into a Redmine install.

License

Notifications You must be signed in to change notification settings

Knitter/pivotal2redmine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pivotal2Redmine

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.

Setup

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.

Know Issues

  1. The rgt, root_id and lft fields that are used by Redmine to create a tree hierarchy are set to null.

  2. Iteration values, dates and other data that has no direct conversion path is ignored.

  3. Comments in Pivotal Tracker export file don’t contain the hour, so when imported, all changes have only the day.

  4. The script could be extended to handle non-existing data as it is simple enough but I have no intention of doing so.

Recovery From a 500 on Issues

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.

License

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.

About

Simple PHP script that tries to import CSV files with Pivotal Tracker issues into a Redmine install.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages