Migrating from Lighthouse to Redmine [15122008]
We love Lighthouse, but here at the Labs our needs have begun to change and Lighthouse no longer feels like a best fit for us. So we've upped stumps and moved to Redmine, which is less flashy but better complements our workflow (such as it is).
I took a couple of hours to write a rake task that politely exploits the Lighthouse API and imports almost all available data from that system into a Redmine instance.
Here it is:
Steps:
- Install the task file into
lib/tasksin your Redmine directory. - Add the lighthouse-api ruby library as a plugin. This essentially involves running the following command from Redmine's
vendor/pluginsdirectory:$ git clone git://github.com/Caged/lighthouse-api.git . - If you haven't already:
- create your database and configure your
database.yml rake db:migraterake redmine:load_default_data- Log into Redmine and create the projects that will contain the data you're importing from Lighthouse. Configure them however you like — in order for the import to happen, they must be named exactly as they are in Lighthouse.
- You can similarly create users and assign them to these projects. Any users with matching names to Lighthouse users will be recognised by the importer.
- create your database and configure your
- In Lighthouse, set up an API token if you haven't already. This can (and should) be a read-only token.
- Now run the script:
$ rake import:lighthouse LH_ACCOUNT=abc LH_TOKEN=xyz...321
Obviously the LH_ACCOUNT and LH_TOKEN environment variables should be entered as per your Lighthouse account. You can also pass in CREATE_USERS=1 to actually create user accounts where they are referenced in the Lighthouse data — they will have dummy names and email addresses, and their passwords will match their login names. If you don't pass in this flag, any unrecognised user references will be assigned to the first admin user.
The script could use a little refactoring, but it worked very well for our needs. Let me know how you go.

I've made some fixes and enhancements, see file at
http://www.redmine.org/boards/1/topics/show/3303