Feature #11709
open
"Issues assigned to me" ordering priority
Added by William Roush about 12 years ago.
Updated over 11 years ago.
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.
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?
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. :(
Wouldn't it be nice if widgets have the same wellknown filter abbility like on the Tickets page?
This is proposed in ticket #12223
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',
Well another idea is to implement user defined filters. With this way, the user could define his views by himself.
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',
- Related to Feature #7769: Sortable columns in issue lists on "My page" added
Also available in: Atom
PDF