diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-08 08:02:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-04-08 08:02:06 +0000 |
commit | 2f77bfde91846b799d70a436783a8eee2741bf75 (patch) | |
tree | 462714ea74eaf4d1de0f83784ee0c0549076b018 /db | |
parent | e4fac91b7da8e4482da06fc33c3d9eeac2d66dc1 (diff) | |
download | redmine-2f77bfde91846b799d70a436783a8eee2741bf75.tar.gz redmine-2f77bfde91846b799d70a436783a8eee2741bf75.zip |
Option to set a default assignee on each project (#482).
Patch by Felix Schäfer.
git-svn-id: http://svn.redmine.org/redmine/trunk@16525 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170309214320_add_project_default_assigned_to_id.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20170309214320_add_project_default_assigned_to_id.rb b/db/migrate/20170309214320_add_project_default_assigned_to_id.rb new file mode 100644 index 000000000..97a4b1905 --- /dev/null +++ b/db/migrate/20170309214320_add_project_default_assigned_to_id.rb @@ -0,0 +1,13 @@ +class AddProjectDefaultAssignedToId < ActiveRecord::Migration + def up + add_column :projects, :default_assigned_to_id, :integer, :default => nil + # Try to copy existing settings from the plugin if redmine_default_assign plugin was used + if column_exists?(:projects, :default_assignee_id, :integer) + Project.update_all('default_assigned_to_id = default_assignee_id') + end + end + + def down + remove_column :projects, :default_assigned_to_id + end +end |