Theme & Workflow configuration by script.

Added by gosh Ratur over 3 years ago

Hey.

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 over 3 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 over 3 years ago

Here are several simple examples of Redmine settings:

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

(1-2/2)