]> source.dussan.org Git - redmine.git/commitdiff
Show the same trackers and statuses on time entry queries (#5385).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 27 May 2017 09:19:14 +0000 (09:19 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 27 May 2017 09:19:14 +0000 (09:19 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@16577 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue_query.rb
app/models/query.rb
app/models/time_entry_query.rb

index ae559713452d5d4f639802840e81807248c1883a..cea18cf736d384f72e5894d8984d272c03a972ff 100644 (file)
@@ -82,7 +82,7 @@ class IssueQuery < Query
 
   def initialize_available_filters
     add_available_filter "status_id",
-      :type => :list_status, :values => lambda { issue_statuses }
+      :type => :list_status, :values => lambda { issue_statuses_values }
 
     add_available_filter("project_id",
       :type => :list, :values => lambda { project_values }
index 7d6b37f367edecdb8893397ff9199727114e8d1b..4894a09586924e248a79833362a751f9c90fb7f7 100644 (file)
@@ -552,7 +552,7 @@ class Query < ActiveRecord::Base
   end
 
   # Returns a scope of issue statuses that are available as columns for filters
-  def issue_statuses
+  def issue_statuses_values
     if project
       statuses = project.rolled_up_statuses
     else
index 0502c4112e1b4eae580a3c9a0c2dbc39820e9363..68640e7ed9871dca44a6d5dc3dfc461756b4ab3d 100644 (file)
@@ -56,11 +56,11 @@ class TimeEntryQuery < Query
     add_available_filter("issue.tracker_id",
       :type => :list,
       :name => l("label_attribute_of_issue", :name => l(:field_tracker)),
-      :values => lambda { Tracker.sorted.map {|t| [t.name, t.id.to_s]} })
+      :values => lambda { trackers.map {|t| [t.name, t.id.to_s]} })
     add_available_filter("issue.status_id",
       :type => :list,
       :name => l("label_attribute_of_issue", :name => l(:field_status)),
-      :values => lambda { IssueStatus.sorted.map {|s| [s.name, s.id.to_s]} })
+      :values => lambda { issue_statuses_values })
     add_available_filter("issue.fixed_version_id",
       :type => :list,
       :name => l("label_attribute_of_issue", :name => l(:field_fixed_version)),