Ruby script to transfer all tickets from Redmine to Gitlab
You need to have access to the gitlab console and an api key to redmine for this to work.
This script worked for me. I take no responsibility for any damage or loss incurred as a result of using this script with or without changes made to it.
- Clone this repo on the server where your gitlab is hosted.
- Edit the config.rb with the correct information (most important are
HOST
,API_KEY
andUSER_CONVERSION
). - Change the
DEBUG_STATE
for the amount of output you want. - Execute the following command as a user that is allowed to use the gitlab console (e.g. gitlab or root)
gitlab-rails runner /path/to/repo/clone/migrate.rb -e production
- Redmine version >=1.4
- GitLab Community Edition 8.0.4 1ff385d
- Ubuntu 14.04
- Not editing
USER_CONVERSION
andDEFAULT_ACCOUNT
, will result in all issues and comments to be linked to the root account of gitlab. - When issues and comments are linked to the
DEFAULT_ACCOUNT
, the original Redmine user will be mentioned. - For a cleaner result the
DEFAULT_ACCOUNT
should not be in the list ofUSER_CONVERSION
. - Redmine can have custom features, if you want to add those to gitlab as labels add their id to
CUSTOM_FEATURES
. - If your Redmine has custom priorities or statuses add them to the correct lists (
PRIORITIES
,OPEN_VALUES
andCLOSED_VALUES
). - Script version 2.1