diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 13:44:58 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-04-01 13:44:58 +0000 |
commit | 1cd6a2aa84db83b127cc037021dc6351877790d0 (patch) | |
tree | ae3eaa0a3f6d15c62771db779f19f15fce4b1d87 /app/models/query.rb | |
parent | 122ba564b9c5c475c360e45af51fa92cfe969657 (diff) | |
download | redmine-1cd6a2aa84db83b127cc037021dc6351877790d0.tar.gz redmine-1cd6a2aa84db83b127cc037021dc6351877790d0.zip |
Adds User and Version custom field format that can be used to reference a project member or version in custom fields (#2096).
These new field formats are available for project, issue, version and time entry custom fields.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5272 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/query.rb')
-rw-r--r-- | app/models/query.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/query.rb b/app/models/query.rb index 3b1b53cc2..6c4d1c7c1 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -1,5 +1,5 @@ # Redmine - project management software -# Copyright (C) 2006-2008 Jean-Philippe Lang +# Copyright (C) 2006-2011 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -636,6 +636,9 @@ class Query < ActiveRecord::Base options = { :type => :date, :order => 20 } when "bool" options = { :type => :list, :values => [[l(:general_text_yes), "1"], [l(:general_text_no), "0"]], :order => 20 } + when "user", "version" + next unless project + options = { :type => :list_optional, :values => field.possible_values_options(project), :order => 20} else options = { :type => :string, :order => 20 } end |