Project

General

Profile

Automating project creation (REST API?)

Added by Tim De Pauw about 14 years ago

At the college where I teach, we are planning to have students use Redmine during their Bachelor's project, which will start in February. Now, I was hoping to fully automate the configuration of our Redmine installation, since going through the same motions for each of the projects would be tedious.

Each project will be worked on by a few students. I've already set up LDAP authentication, so user account creation isn't an issue. Now, starting from a list of projects and a list of associated user names, I would like to add every project to Redmine, set up the appropriate access rights, and maybe link the project to its git repository.

Looking at the docs for REST API, currently, it isn't fine-grained enough to accomplish this. Would it perhaps be feasible to manually insert the database records instead using a bit of scripting? I know PHP, Perl and some Ruby, so I don't mind a fair bit of coding. I haven't looked at the database yet since I was hoping for a cleaner and safer way. I'm just looking for the best approach; if there isn't any, we'll just have to force students to do it themselves. :-)

Thanks in advance for your input!


Replies (2)

RE: Automating project creation (REST API?) - Added by Felix Schäfer about 14 years ago

Don't insert into the database as that bypasses rails and might have unexpected consequences. There are a console and a "script runner" in your redmine directory (script/console and script/runner), you can use the later as interpreter in a "redmine script" (just start the file with #!/path/to/redmine/script/runner). You will need to get a little into how redmine works though, I suggest you read the controllers for the actions that you are trying to accomplish to get a grasp of it.

RE: Automating project creation (REST API?) - Added by Tim De Pauw about 14 years ago

Thanks for answering so quickly! I guess I've got an excuse for diving into Ruby a little deeper now.

    (1-2/2)