summaryrefslogtreecommitdiffstats
path: root/app/helpers/projects_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-08 08:02:06 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-08 08:02:06 +0000
commit2f77bfde91846b799d70a436783a8eee2741bf75 (patch)
tree462714ea74eaf4d1de0f83784ee0c0549076b018 /app/helpers/projects_helper.rb
parente4fac91b7da8e4482da06fc33c3d9eeac2d66dc1 (diff)
downloadredmine-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.rb5
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}")