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' %>