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 /app/helpers/projects_helper.rb | |
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 'app/helpers/projects_helper.rb')
-rw-r--r-- | app/helpers/projects_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 3e1f0d804..cd0d7840f 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -89,6 +89,11 @@ module ProjectsHelper version_options_for_select(versions, project.default_version) end + def project_default_assigned_to_options(project) + assignable_users = (project.assignable_users.to_a + [project.default_assigned_to]).uniq.compact + principals_options_for_select(assignable_users, project.default_assigned_to) + end + def format_version_sharing(sharing) sharing = 'none' unless Version::VERSION_SHARINGS.include?(sharing) l("label_version_sharing_#{sharing}") |