Theme & Workflow configuration by script.

Added by gosh Ratur about 7 years ago


I really want to script Redmine installation with configuration.
Actually, i just docs the install.

Is it possible to import/export Redmine workflow/issue & co configuration ?
Can I configure workflow with command line or smthing ?

Last question, is it possible to change "default redmine theme" in file conf, or command line?

My final goal is to script Redmine, and NOT touch any configuration with Administration panel. Redmine have to be full conf after the install script.

thanks a lot.

Replies (2)

RE: Theme & Workflow configuration by script. - Added by Rafael Gutkowski about 7 years ago

Configuring Redmine is pretty easy since most of the configuration is stored in database.
Using Ruby for writing such CLI would be trivial since Redmine is written in Ruby itself.
To create such tool basic programming knowladge would be necessary.

As a starting point you can use code snippet below in order to load Redmine enviroment:

#!/usr/bin/env ruby

require "#{REDMINE_ROOT}/config/boot" 

# now you will have access to full Rails and Redmine API
Setting.ui_theme = 'yourtheme'

RE: Theme & Workflow configuration by script. - Added by Djordjije Crni about 7 years ago

Here are several simple examples of Redmine settings:

cat << "EOF" | bundle exec rails console production
Setting.welcome_text="My welcome text" 
Setting.app_title="My Redmine" 
Setting.emails_footer="My footer" 
You can find lot of much more complex examples for Workflows, Trackers, Users, Groups etc in test/functional/ directory.