Browse Source

Filter after project custom fields (#29482).

Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@18764 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Jean-Philippe Lang 4 years ago
parent
commit
ecd9d9ba2f
2 changed files with 6 additions and 0 deletions
  1. 1
    0
      app/models/project_query.rb
  2. 5
    0
      app/models/query.rb

+ 1
- 0
app/models/project_query.rb View 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

+ 5
- 0
app/models/query.rb View 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
[

Loading…
Cancel
Save