summaryrefslogtreecommitdiffstats
path: root/app/helpers/queries_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-29 20:51:48 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-29 20:51:48 +0000
commitcd6db6a3cbe43880eca4eec8c967fb78d95a2926 (patch)
tree42219d3f9b276f197f5045cec25639bb4e2be5fd /app/helpers/queries_helper.rb
parent0c5af16e14570a384e154430cd1e9fa123cdf579 (diff)
downloadredmine-cd6db6a3cbe43880eca4eec8c967fb78d95a2926.tar.gz
redmine-cd6db6a3cbe43880eca4eec8c967fb78d95a2926.zip
Adds support for multiselect custom fields (#1189).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8721 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/queries_helper.rb')
-rw-r--r--app/helpers/queries_helper.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/helpers/queries_helper.rb b/app/helpers/queries_helper.rb
index 681a19a45..bead33315 100644
--- a/app/helpers/queries_helper.rb
+++ b/app/helpers/queries_helper.rb
@@ -31,7 +31,14 @@ module QueriesHelper
def column_content(column, issue)
value = column.value(issue)
-
+ if value.is_a?(Array)
+ value.collect {|v| column_value(column, issue, v)}.compact.sort.join(', ')
+ else
+ column_value(column, issue, value)
+ end
+ end
+
+ def column_value(column, issue, value)
case value.class.name
when 'String'
if column.name == :subject