Project

General

Profile

Actions

Feature #4985

closed

Filter issues which are blocked

Feature #4985: Filter issues which are blocked

Added by Martin Kjeldsen over 16 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Resolution:
Duplicate

Description

I would be nice if it was possible to filter issues which are blocked by other issues. This way the list would be less cluttered by issues, which can't be closed at present anyways.

The issues should appear on the list when the ticket(s) blocking them are closed


Related issues 3 (1 open — 2 closed)

Related to Redmine - Feature #4561: Allow filter to hide/show tasks which are blocked by other tasksClosedActions
Related to Redmine - Feature #5140: email notification when related blocking issues get closedNewActions
Is duplicate of Redmine - Feature #3265: Filter on issue relationsClosedJean-Philippe LangActions

Updated by Arndt Faulhaber about 16 years ago Actions #1

Nice would also be a column with an blocked-icon in case the blocked filter is not used...

Cheers, Arndt

Updated by Arndt Faulhaber about 16 years ago Actions #2

Btw. related Tickets I could find (maybe this helps ;) ):

#2955
#4561
#5140

---Arndt

Updated by Etienne Massip over 15 years ago Actions #3

  • Category set to Issues

Updated by Maxim Nikolaevich over 15 years ago Actions #4

may be somebody can create plugin for that?
BTW related code probably can be found here #2954 (i think 'blocked by' and 'duplicated' issues is very similar)

Updated by Maxim Nikolaevich over 15 years ago Actions #5

other code about issue is available on #3265

Updated by Maccabee Levine over 15 years ago Actions #6

I would like this as well; it's very difficult to make sense of an issue list when you can't see which items are actionable and which aren't.

Updated by Maxim Nikolaevich almost 15 years ago Actions #7

patch

s@spserv:~/sites/redmine/trunk$ svn diff
Index: app/models/query.rb
===================================================================
--- app/models/query.rb    (revision 7841)
+++ app/models/query.rb    (working copy)
@@ -222,6 +222,7 @@
                            "start_date" => { :type => :date, :order => 11 },
                            "due_date" => { :type => :date, :order => 12 },
                            "estimated_hours" => { :type => :float, :order => 13 },
+                           "related_to" => { :type => :list, :order => 15, :values => [["blocked by any open issue", "blocked by any open issue"]]},
                            "done_ratio" =>  { :type => :integer, :order => 14 }}

     principals = []
@@ -591,6 +592,29 @@
       sql_for_field(field, '=', value, db_table, 'user_id') + ')'
   end

+  def sql_for_related_to_field(field, operator, value)
+    if operator == '=' 
+      cond = 'IN'
+    else
+      cond = 'NOT IN'
+    end
+    
+    relation_table  = IssueRelation.table_name
+    issue_table     = Issue.table_name
+    link_type       = 'blocks'
+    
+    statuses_table = IssueStatus.table_name
+    closed_issue_statuses = "SELECT id from #{statuses_table} WHERE is_closed=1" 
+    
+    # all CLOSED issues have blocked links
+    linked_sql = "SELECT #{relation_table}.issue_to_id from #{relation_table}, #{issue_table} WHERE " 
+    linked_sql << "relation_type='#{link_type}' AND " 
+    linked_sql << "#{issue_table}.id = #{relation_table}.issue_from_id AND " 
+    linked_sql << "#{issue_table}.status_id NOT IN (#{closed_issue_statuses})" 
+    
+    "#{issue_table}.id #{cond} (#{linked_sql})" 
+  end
+
   def sql_for_member_of_group_field(field, operator, value)
     if operator == '*' # Any group
       groups = Group.all
Index: config/locales/en.yml
===================================================================
--- config/locales/en.yml    (revision 7841)
+++ config/locales/en.yml    (working copy)
@@ -314,6 +314,7 @@
   field_scm_path_encoding: Path encoding
   field_path_to_repository: Path to repository
   field_root_directory: Root directory
+  field_related_to: Related
   field_cvsroot: CVSROOT
   field_cvs_module: Module

Updated by Jean-Philippe Lang about 14 years ago Actions #8

  • Status changed from New to Closed
  • Resolution set to Duplicate

Dup of more generic #3265.

Actions

Also available in: PDF Atom