]> source.dussan.org Git - redmine.git/commitdiff
Filter after project custom fields (#29482).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 19 Oct 2019 11:39:02 +0000 (11:39 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 19 Oct 2019 11:39:02 +0000 (11:39 +0000)
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@18764 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/project_query.rb
app/models/query.rb

index 71878c2a80c7beae5e812b5164443d01a8a2473e..2bc6b40e1d49a046e9ad05776935c42132cd545e 100644 (file)
@@ -44,6 +44,7 @@ class ProjectQuery < Query
       :type => :list,
       :values => [[l(:general_text_yes), "1"], [l(:general_text_no), "0"]]
     add_available_filter "created_on", :type => :date_past
+    add_custom_fields_filters(project_custom_fields)
   end
 
   def available_columns
index 3ad39365ffec432aa1498ccf22a840fe638892b1..7372f712e0d653cbc1a26b91f37d05b00da54227 100644 (file)
@@ -609,6 +609,11 @@ class Query < ActiveRecord::Base
     end
   end
 
+  # Returns a scope of project custom fields that are available as columns or filters
+  def project_custom_fields
+    ProjectCustomField.all
+  end
+
   # Returns a scope of project statuses that are available as columns or filters
   def project_statuses_values
     [