Feature #11709

"Issues assigned to me" ordering priority

Added by William Roush over 9 years ago. Updated over 8 years ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:My page
Target version:-
Resolution:

Description

I see it as just being ordered by priority.

I think two other things should be taken into account:

  • Issue's due date.
  • Issue's target version due date.

I have issues that have either no target set, or a target set with no due date that are higher up than issues that are due next week due to the target version they're attached to.

It'll make this page MUCH more useful.


Related issues

Related to Redmine - Feature #12223: Make "My Page"-Widgets filterable Closed
Related to Redmine - Feature #7769: Sortable columns in issue lists on "My page" Closed 2011-03-03

History

#1 Updated by Jean-Philippe Lang over 9 years ago

Sorting by due date first would make sense indeed. I propose to sort by due date/version due date then priority, is it OK for you?

#2 Updated by William Roush over 9 years ago

I agree with that, this may be also a view that we'd want available on the main issue list page, so it may be best to put this query where both the "my page" and "view issues" page can call it.

I was looking into writing it but my Ruby-fu is quite weak and this query is a bit messy. :(

#3 Updated by Tobias Fischer almost 9 years ago

Wouldn't it be nice if widgets have the same wellknown filter abbility like on the Tickets page?
This is proposed in ticket #12223

#4 Updated by Michel Albert over 8 years ago

I just wanted to have this feature implemented myself.

This is what I came up with...

NOTE: This will most likely only work on PostgreSQL!!!

diff -ur a/app/views/my/blocks/_issuesassignedtome.html.erb b/app/views/my/blocks/_issuesassignedtome.html.erb
--- a/app/views/my/blocks/_issuesassignedtome.html.erb  2013-06-27 14:36:39.111675538 +0200
+++ b/app/views/my/blocks/_issuesassignedtome.html.erb  2013-06-27 14:36:08.423136285 +0200
@@ -4,7 +4,7 @@
                                 :conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)},
                                 :limit => 10,
                                 :include => [ :status, :project, :tracker, :priority ],
-                                :order => "#{IssuePriority.table_name}.position DESC, #{Issue.table_name}.updated_on DESC") %>
+                                :order => "(#{IssuePriority.table_name}.position * EXTRACT(EPOCH FROM AGE(#{Issue.table_name}.due_date))) DESC NULLS LAST") %>
 <%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
 <% if assigned_issues.length > 0 %>
 <p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',

#5 Updated by Daniel Felix over 8 years ago

Well another idea is to implement user defined filters. With this way, the user could define his views by himself.

#6 Updated by Michel Albert over 8 years ago

Here's a slightly better version. It sorts by "score" first, then by status and last update time. Essentially it only adds the "score" ordering.

diff -ur a/app/views/my/blocks/_issuesassignedtome.html.erb b/app/views/my/blocks/_issuesassignedtome.html.erb
--- a/app/views/my/blocks/_issuesassignedtome.html.erb  2013-06-27 14:36:39.111675538 +0200
+++ b/app/views/my/blocks/_issuesassignedtome.html.erb  2013-06-27 14:36:08.423136285 +0200
@@ -4,7 +4,7 @@
                                 :conditions => {:assigned_to_id => ([User.current.id] + User.current.group_ids)},
                                 :limit => 10,
                                 :include => [ :status, :project, :tracker, :priority ],
-                                :order => "#{IssuePriority.table_name}.position DESC, #{Issue.table_name}.updated_on DESC") %>
+                                :order => "(#{IssuePriority.table_name}.position * EXTRACT(EPOCH FROM AGE(#{Issue.table_name}.due_date))) DESC NULLS LAST, #{IssuePriority.table_name}.position DESC, #{Issue.table_name}.updated_on DESC") %>
 <%= render :partial => 'issues/list_simple', :locals => { :issues => assigned_issues } %>
 <% if assigned_issues.length > 0 %>
 <p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',

#7 Updated by Go MAEDA over 1 year ago

  • Related to Feature #7769: Sortable columns in issue lists on "My page" added

Also available in: Atom PDF