Project

General

Profile

Enable modules for multiple projects at once

Added by Cheng-Hui PENG over 2 years ago

Hi there,

I have over 500+ projects in my system so I can't enable a new module for project one by one.
Does anyone know how to enable a module for multiple projects at once?

////////////////
Just an update for those who has same problem.

>cd redmine_root
>rails console

>> Project.all.each { |p| p.enable_module!(:Module_name) }
>> exit

>


Replies (1)

RE: Enable modules for multiple projects at once - Added by Mischa The Evil over 2 years ago

As I wrote in #37580#note-1 previously:

Redmine core does not provide features to achieve this using the web-UI. However, you can do this programmatically using either the console or the runner using something along the lines of:

Project.all.each do |project|
  project.enable_module!(:module_name)
end

    (1-1/1)