Project

General

Profile

Actions

Feature #4985

closed

Filter issues which are blocked

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

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
2010-03-04
Due date:
% Done:

0%

Estimated time:
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

Related to Redmine - Feature #4561: Allow filter to hide/show tasks which are blocked by other tasksClosed2010-01-13

Actions
Related to Redmine - Feature #5140: email notification when related blocking issues get closedNew2010-03-21

Actions
Is duplicate of Redmine - Feature #3265: Filter on issue relationsClosedJean-Philippe Lang2009-04-29

Actions
Actions #1

Updated by Arndt Faulhaber over 13 years ago

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

Cheers, Arndt

Actions #2

Updated by Arndt Faulhaber over 13 years ago

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

#2955
#4561
#5140

---Arndt

Actions #3

Updated by Etienne Massip about 13 years ago

  • Category set to Issues
Actions #4

Updated by Maxim Nikolaevich about 13 years ago

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)

Actions #5

Updated by Maxim Nikolaevich about 13 years ago

other code about issue is available on #3265

Actions #6

Updated by Maccabee Levine almost 13 years ago

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.

Actions #7

Updated by Maxim Nikolaevich over 12 years ago

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
Actions #8

Updated by Jean-Philippe Lang over 11 years ago

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

Dup of more generic #3265.

Actions

Also available in: Atom PDF