Project

General

Profile

Actions

Feature #6118

closed

Filter by parent task or subtasks

Added by Xagyg Wulf over 13 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Issues
Target version:
Start date:
2010-08-12
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

There doesn't seem to be an option to use "parent task" as a filter. I want to be able to select parent task as a filter and say "Parent Task is null" - so that I get all top-level issues (as well as issues without any children).


Files


Related issues

Related to Redmine - Patch #6431: Allow parent task field to be used in filtersClosed2010-09-18

Actions
Related to Redmine - Feature #5325: Add Parent Task to 'Group Results By' drop downNew2010-04-15

Actions
Related to Redmine - Feature #6116: Group sub-tasks with parent on issue listNew2010-08-12

Actions
Related to Redmine - Feature #9992: Ability to filter issue subtasks in issue formNew

Actions
Related to Redmine - Feature #10828: Request multiple distinct values including issue id, parent_id, root_idNewJean-Philippe Lang

Actions
Related to Redmine - Feature #13054: Add the ability to filter issues on parent task.Closed

Actions
Related to Redmine - Feature #22147: Change "Related issues" label for generic grouped query filtersClosedJean-Philippe Lang

Actions
Related to Redmine - Feature #33352: Enable inline issue autocomplete in issue id query filter fieldsNew

Actions
Has duplicate Redmine - Feature #5728: Parent task field should be made available as filter in the issue listClosed2010-06-22

Actions
Has duplicate Redmine - Feature #9592: Filtering by parent taskClosed2011-11-17

Actions
Has duplicate Redmine - Feature #10763: REST-API: Please add "parent_issue_id" as filter for requests to filter out subticketsClosed

Actions
Actions #1

Updated by Xagyg Wulf over 13 years ago

Whoops - strike the bit in brackets "(as well as issues without any children)".

This is what I meant:

I want to be able to select parent task as a filter and say "Parent Task is null" - so that I get all top-level issues.

Actions #2

Updated by Sepp _ over 13 years ago

+1

Actions #3

Updated by Jeffrey Jones over 13 years ago

+1 This would be a hugely useful feature for things like the Gantt chart where we want an overview.

Actions #4

Updated by Anders Fältros over 13 years ago

+1 Really would like to have this!

Actions #5

Updated by Ewan Makepeace over 13 years ago

+1

We have added a patch to sum all the estimated issues on the page, all the issues returned by the query and also those in each group when grouped. Parent tasks are causing us to double (or triple) count some hours as they report the sum of all their child tasks (which may also be in the same list). Even with a filter on Parent Task (which I support) I still have a problem - could there be a 'Has Child Tasks' filter as well perhaps?

Actions #6

Updated by Emmanuel Toche over 13 years ago

+1

Actions #7

Updated by Sylvain Guimond over 13 years ago

+1

Actions #8

Updated by Charlie Chen over 13 years ago

+1

Actions #9

Updated by Martin Denizet (redmine.org team member) almost 13 years ago

My users don't like sub-tasking because they feel like it's making things more complicated and messy than before.
I think a "Is Parent" filter would really help them!
+1

Actions #10

Updated by David Andrews almost 13 years ago

+1 please.

Actions #11

Updated by Ruedi Silvestri over 12 years ago

+1 also a patch would be much appreciated.

Actions #12

Updated by Terence Mill over 12 years ago

+1

Actions #13

Updated by Lucas CORBEAUX over 12 years ago

+1, such a filter would be really useful.

Actions #14

Updated by Terence Mill over 12 years ago

+1

Actions #15

Updated by Etienne Massip over 12 years ago

  • Category set to Issues
Actions #16

Updated by Matthias Neubert over 12 years ago

+1 seems that there will be some progress regarding this issue, can you determine for which version number this is planed?

regards
Matthias

Actions #17

Updated by Mischa The Evil over 12 years ago

This feature was first requested via issue #5728. It was created by the UX-Team after UXTeamMeeting1 (see their meeting minutes, under "Core Challenges Observed with Subtask Feature:", number 2).
I've just closed #5728 as a "duplicated by" of this issue since most of the (relevant) discussion has taken place here (as suggested by Colan Schwartz).

Actions #18

Updated by Mischa The Evil over 12 years ago

  • Target version set to Unplanned backlogs

This, along with #6116 / #5325, seems important things to improve handling of subtasks.

Actions #19

Updated by Bartosz Cisek about 12 years ago

+1

Actions #20

Updated by Gokay Gok about 12 years ago

+1

Actions #21

Updated by Paweł Maruszczyk over 11 years ago

+1

Actions #23

Updated by Tomas K over 11 years ago

+1

Actions #24

Updated by Hugo Zambotti over 11 years ago

+1

Actions #25

Updated by Florent Fievez over 11 years ago

+1

Actions #27

Updated by Josh Hansen over 11 years ago

+1

Actions #28

Updated by Daniel Felix about 11 years ago

Mischa The Evil wrote:

This, along with #6116 / #5325, seems important things to improve handling of subtasks.

Agree! This could be handsome on greater projects with much subtasks.

Actions #29

Updated by Thomas Lmx about 11 years ago

+1
It seems to be the most important feature for my project !

Actions #30

Updated by David Robinson about 11 years ago

+1

Actions #31

Updated by Dominik Follmann about 11 years ago

Thomas Lmx wrote:

+1
It seems to be the most important feature for my project !

same for us.

Actions #32

Updated by Daniel Felix about 11 years ago

Reference also #9992-8

Actions #33

Updated by Alexey Efimov about 11 years ago

+1 I'm interested in this feature also.

Actions #34

Updated by Sylvain Just about 11 years ago

+1 this feature will be very usefull for me too.

If anybody is interested, I also made a patch for display the parent subject and/or ID in email subject notification.
This information allow project manager to create template task with generic sub-tasks and copy it for recursives task.
Notifications by mail make more sense when subtask subject depends of parent subject.

Note : when task is just created, parent subject is unknown... so I display parent id instead of.

diff -r 64316d392708 -r 0f36159c4d63 app/models/mailer.rb
--- a/app/models/mailer.rb  Tue Jan 22 16:06:10 2013 +0100
+++ b/app/models/mailer.rb  Tue Jan 22 16:06:55 2013 +0100
@@ -43,9 +43,15 @@
     @issue_url = url_for(:controller => 'issues', :action => 'show', :id => issue)
     recipients = issue.recipients
     cc = issue.watcher_recipients - recipients
+   #s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) " 
+   s = "[#{issue.project.name} - " 
+   s << "#{issue.tracker.name} " if (issue.tracker.id != 4)
+   s << "##{issue.id}] (#{issue.status.name}) " 
+   s << "##{issue.parent_issue_id} > " if issue.parent_issue_id
+   s << "#{issue.subject}" 
     mail :to => recipients,
       :cc => cc, 
-      :subject => "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" 
+      :subject => s
   end 

   # Builds a Mail::Message object used to email recipients of the edited issue.
@@ -65,8 +71,11 @@
     recipients = issue.recipients
     # Watchers in cc
     cc = issue.watcher_recipients - recipients
-    s = "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] " 
+    s = "[#{issue.project.name} - " 
+   s << "#{issue.tracker.name} " if (issue.tracker.id != 4)
+   s << "##{issue.id}] " 
     s << "(#{issue.status.name}) " if journal.new_value_for('status_id')
+   s << "#{issue.parent.subject} - " if issue.parent
     s << issue.subject
     @issue = issue
     @journal = journal

You can also patch your project to display parent subject instead of tracker and ID in issues list :

diff -r 70ce4d70b7e1 -r 61345a556b62 app/helpers/application_helper.rb
--- a/app/helpers/application_helper.rb Tue Jan 22 16:12:26 2013 +0100
+++ b/app/helpers/application_helper.rb Tue Jan 22 20:10:39 2013 +0100
@@ -64,10 +64,13 @@
   #   link_to_issue(issue, :truncate => 6)        # => Defect #6: This i...
   #   link_to_issue(issue, :subject => false)     # => Defect #6
   #   link_to_issue(issue, :project => true)      # => Foo - Defect #6
+  #   link_to_issue(issue, :title => subject)     # => This is the subject: Defect #6
+  #                                              # if 'id' or nil => default behavior
   #
   def link_to_issue(issue, options={})
     title = nil 
     subject = nil 
+   if options[:title] == nil || options[:title] == 'id'
     if options[:subject] == false
       title = truncate(issue.subject, :length => 60) 
     else
@@ -82,6 +85,18 @@
     s << h(": #{subject}") if subject
     s = h("#{issue.project} - ") + s if options[:project]
     s   
+   elsif options[:title] == 'subject'
+       subject = issue.subject
+       if options[:truncate]
+         subject = truncate(subject, :length => options[:truncate])
+       end
+       tracker = "#{h(issue.tracker)} ##{issue.id}" 
+       s = link_to subject, {:controller => "issues", :action => "show", :id => issue},
+                                                    :class => issue.css_classes,
+                                                    :title => tracker
+       s = h("#{issue.project} - ") + s if options[:project]
+       s
+   end
   end 

   # Generates a link to an attachment.
diff -r 70ce4d70b7e1 -r 61345a556b62 app/helpers/queries_helper.rb
--- a/app/helpers/queries_helper.rb Tue Jan 22 16:12:26 2013 +0100
+++ b/app/helpers/queries_helper.rb Tue Jan 22 20:10:39 2013 +0100
@@ -72,7 +72,7 @@
     when 'FalseClass'
       l(:general_text_No)
     when 'Issue'
-      link_to_issue(value, :subject => false)
+      link_to_issue(value, {:subject => false, :title => 'subject'})
     else
       h(value)
     end

Actions #35

Updated by André Schloemp almost 11 years ago

+1 we need this feature

Actions #36

Updated by Vito Marolda almost 11 years ago

+1

Actions #37

Updated by Sergio Tendero over 10 years ago

+1

Actions #38

Updated by loic Le Gallou over 10 years ago

+1 (display should include indirect subtasks in order to see the full branches related to a top parent task)

Actions #39

Updated by Artem Beloglazov over 10 years ago

+1

Actions #40

Updated by Jeffrey Clark over 10 years ago

Patch in #10828 should resolve this issue.

Actions #41

Updated by Toshi MARUYAMA over 10 years ago

  • Related to Feature #10828: Request multiple distinct values including issue id, parent_id, root_id added
Actions #42

Updated by Maxime Vez almost 10 years ago

+1

Actions #43

Updated by Laurent Dairaine over 9 years ago

+1

Actions #44

Updated by Felix Schäfer over 9 years ago

Here is a patch that adds a filter for parent task on the issue list.

Actions #45

Updated by Mischa The Evil over 9 years ago

  • Related to Feature #13054: Add the ability to filter issues on parent task. added
Actions #46

Updated by Luis Ferrao over 9 years ago

It's been 4 years and innumerable similar requests, this feature is as basic as it gets, what's the hold up?

Actions #47

Updated by Vjacheslav Ryzhov over 9 years ago

Luis Ferrao wrote:

It's been 4 years and innumerable similar requests, this feature is as basic as it gets, what's the hold up?

subscribe to the issue

Actions #48

Updated by David Marín Carreño over 9 years ago

+1

Actions #49

Updated by Baatar Sukhbaatar about 9 years ago

+1

Actions #50

Updated by Igor Pellegrini about 9 years ago

+1

Any planned roadmap that could include this feature?
Would really improve my (and others) workflow.

Thanks.

Actions #51

Updated by Daniel Felix about 9 years ago

Our company uses many issues with many parent tasks. This feature would greatly improve our work with redmine, as we could filter all "master" issues. This would be really great to see this in the next release.

Actions #52

Updated by Mischa The Evil about 9 years ago

A while ago I started a test of the patch Felix posted in #6118#note-44, therefor I started writing a solid test to back up the rather small code change.
I just finished extracting a patch (using git diff on a local dev branch, so don't mind the SHA's) from the older VM (source:/trunk@13697) I was working on, which includes the change proposed by Felix (although slightly adjusted to match current code [the filter key double quoted, while single quotes work just as fine here]) and an additional test (QueryTest#test_filter_on_parent_task_id) which covers the availability of the filter for issue queries and tests the functionality of each of the operators that are available for integer type filters. With this patch applied (as said on source:/trunk@13697) all existing tests pass (mysql-only, without ldap, scm and ui), as so does the newly added test for this feature.

@Jean-Philippe: can you assess/review this feature and patch to see if it can still be included in 3.0.0? There is obviously a clear demand for this and the change seems rather small and oversee-able, especially now that it includes a test.

Actions #53

Updated by Sebastian Paluch about 9 years ago

This is great feature but should be done as more complete and include filter by parent task, root task and is leaf. Those are all parent-child relations.

Actions #54

Updated by txemi M about 9 years ago

+1

I am patching production with Felix's patch, I would love it included in next release.
Useful for views of root tasks or child tasks of given task.

Actions #55

Updated by Jaromír Rys almost 9 years ago

+1

Actions #56

Updated by Maik Lindner almost 9 years ago

+1

Actions #57

Updated by Florian ROBERT almost 9 years ago

+1

Actions #58

Updated by Go MAEDA almost 9 years ago

  • Target version changed from Candidate for next major release to 3.1.0

I tested Mischa The Evil's patch on current trunk (r14300) and it works fine.

Could it be in Redmine 3.1.0?

Actions #59

Updated by Jean-Philippe Lang almost 9 years ago

  • Subject changed from Filter by parent task to Filter by parent task or subtasks
  • Status changed from New to Closed
  • Resolution set to Fixed

Mischa's patch is nice and simple but it does not address all the posibilities requested here.
I've added 2 filters in r14304 to filter on parent and subtasks (these 2 filters can be combined):

  • parent
    • is XXX (=> lists child issues of XXX)
    • contains XXX (=> lists descendant issues of XXX)
    • none (=> lists root issues)
    • any (=> lists subtasks)
  • subtasks
    • is XXX (=> lists the parent of XXX, maybe not so usefull)
    • contains XXX (=> lists ancestors of XXX)
    • none (=> lists leaf issues)
    • any (=> lists parent issues)
Actions #60

Updated by Go MAEDA almost 9 years ago

Thank you very much for implementing this!

Actions #61

Updated by Sebastian Paluch almost 9 years ago

That is great, no more plugins!

The only option that seems to be missing under "subtasks" is ability to show issue hierarchy deep to some level. This is useful to see overall list of job to do for a project to some level of details. (#20129)

Actions #62

Updated by Colan Schwartz over 8 years ago

Sebastian Paluch wrote:

The only option that seems to be missing under "subtasks" is ability to show issue hierarchy deep to some level. This is useful to see overall list of job to do for a project to some level of details.

Open another ticket for that (unless there is one already), and link to it from here. Let's not cloud this fixed issue.

Actions #63

Updated by Alex Petty over 8 years ago

Jean-Philippe Lang wrote:

I've added 2 filters in r14304 to filter on parent and subtasks (these 2 filters can be combined):

Excellent!! Thanks Jean-Philippe!!

Actions #64

Updated by Regis Leneveu over 8 years ago

This seems to be the solution for some user-requests in our company.

Could you explain - for the rest of us - HOW I could create a filter which shows a specific tasks an all his related subtasks in a hierarchy?
I just can't figure it ou.

Thanks, Régis

Actions #65

Updated by Toshi MARUYAMA almost 8 years ago

  • Related to Feature #22147: Change "Related issues" label for generic grouped query filters added
Actions #66

Updated by Go MAEDA almost 7 years ago

  • Has duplicate Feature #10763: REST-API: Please add "parent_issue_id" as filter for requests to filter out subtickets added
Actions #67

Updated by Mischa The Evil almost 4 years ago

  • Related to Feature #33352: Enable inline issue autocomplete in issue id query filter fields added
Actions

Also available in: Atom PDF