From 185547af69874e99418e06aa9d77aa10e4cee18b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 4 Oct 2007 17:15:55 +0000 Subject: [PATCH] Issues sorted by priority position. git-svn-id: http://redmine.rubyforge.org/svn/trunk@801 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/query.rb | 2 +- app/views/my/blocks/_issuesassignedtome.rhtml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/query.rb b/app/models/query.rb index 837b6515a..4df3d628b 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -74,7 +74,7 @@ class Query < ActiveRecord::Base @@available_columns = [ QueryColumn.new(:tracker, :sortable => "#{Tracker.table_name}.position"), QueryColumn.new(:status, :sortable => "#{IssueStatus.table_name}.position"), - QueryColumn.new(:priority, :sortable => "#{Issue.table_name}.priority_id"), + QueryColumn.new(:priority, :sortable => "#{Enumeration.table_name}.position"), QueryColumn.new(:subject), QueryColumn.new(:assigned_to, :sortable => "#{User.table_name}.lastname"), QueryColumn.new(:updated_on, :sortable => "#{Issue.table_name}.updated_on"), diff --git a/app/views/my/blocks/_issuesassignedtome.rhtml b/app/views/my/blocks/_issuesassignedtome.rhtml index 4f020b4ca..99812f6d0 100644 --- a/app/views/my/blocks/_issuesassignedtome.rhtml +++ b/app/views/my/blocks/_issuesassignedtome.rhtml @@ -2,8 +2,8 @@ <% assigned_issues = Issue.find(:all, :conditions => ["assigned_to_id=? AND #{IssueStatus.table_name}.is_closed=? AND #{Project.table_name}.status=#{Project::STATUS_ACTIVE}", user.id, false], :limit => 10, - :include => [ :status, :project, :tracker ], - :order => "#{Issue.table_name}.priority_id DESC, #{Issue.table_name}.updated_on DESC") %> + :include => [ :status, :project, :tracker, :priority ], + :order => "#{Enumeration.table_name}.position DESC, #{Issue.table_name}.updated_on DESC") %> <%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %> <% if assigned_issues.length > 0 %>

<%= link_to l(:label_issue_view_all), :controller => 'issues', :action => 'index', :set_filter => 1, :assigned_to_id => 'me' %>

-- 2.39.5