]> source.dussan.org Git - redmine.git/commitdiff
Expose project updated_on column and filter in project query (#40829).
authorGo MAEDA <maeda@farend.jp>
Thu, 27 Jun 2024 04:46:27 +0000 (04:46 +0000)
committerGo MAEDA <maeda@farend.jp>
Thu, 27 Jun 2024 04:46:27 +0000 (04:46 +0000)
Patch by Felix Schäfer (@felix).

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

app/models/project_query.rb

index dde3e9cc1f3b43c28b30e0de3a46c2215d79c84f..a1bb52a2cf4af400c3dc5a5730d92ae81da9a311 100644 (file)
@@ -37,6 +37,7 @@ class ProjectQuery < Query
     QueryColumn.new(:parent_id, :sortable => "#{Project.table_name}.lft ASC", :default_order => 'desc', :caption => :field_parent),
     QueryColumn.new(:is_public, :sortable => "#{Project.table_name}.is_public", :groupable => true),
     QueryColumn.new(:created_on, :sortable => "#{Project.table_name}.created_on", :default_order => 'desc'),
+    QueryColumn.new(:updated_on, :sortable => "#{Project.table_name}.updated_on", :default_order => 'desc'),
     QueryColumn.new(:last_activity_date)
   ]
 
@@ -78,6 +79,7 @@ class ProjectQuery < Query
       :values => [[l(:general_text_yes), "1"], [l(:general_text_no), "0"]]
     )
     add_available_filter "created_on", :type => :date_past
+    add_available_filter "updated_on", :type => :date_past
     add_custom_fields_filters(project_custom_fields)
   end