Project

General

Profile

Subtask display fields

Added by Kai Meyer over 13 years ago

I really like how parent issues calculate their properties based on subtasks (like estimated time, start/end date, priority, ect).

However, I am interested in adding which properites show up in the subtask area. For example, the subtask area shows Tracker, Issue Id, Subject, Status, %complete. I would like to be able to add some overview on time estimates, and time worked, and perhaps even time left in the same area. Is that possible?


Replies (3)

RE: Subtask display fields - Added by Alex Koller over 13 years ago

Hi Kai,

I wanted to display the priority on sub-tasks. A google search led me here.

I added a priority column by editing the following file (on version 1.0):
/app/helpers/issues_helper.rb
Add the following line after line 61 (which is an identical line, except for status):

             content_tag('td', h(child.priority)) +

The method render_descendants_tree in the helper basically outpus a table, so a lot can be done:
  • Column headings
  • Totals (for estimated hours)
  • Ordering
  • etc.

If I had more time... but I hope this helps in some way.

Alex

RE: Subtask display fields - Added by Kai Meyer over 13 years ago

I must have a different version, I found it on line 72.

svn diff app/helpers/issues_helper.rb Index: app/helpers/issues_helper.rb =================================================================== --- app/helpers/issues_helper.rb (revision 4244) +++ app/helpers/issues_helper.rb (working copy) @@ -70,6 +70,7 @@ content_tag('td', check_box_tag("ids[]", child.id, false, :id => nil), :class => 'checkbox') + content_tag('td', link_to_issue(child, :truncate => 60), :class => 'subject') + content_tag('td', h(child.status)) + + content_tag('td', h(child.estimated_hours)) + content_tag('td', link_to_user(child.assigned_to)) + content_tag('td', progress_bar(child.done_ratio, :width => '80px')), :class => "issue issue-#{child.id} hascontextmenu #{level > 0 ? "idnt idnt-#{level}" : nil}")
Worked like a champ :)

RE: Subtask display fields - Added by Kai Meyer over 13 years ago

Sorry, poor formatting, and I can't find the edit button. This should work correctly :)

svn diff app/helpers/issues_helper.rb
Index: app/helpers/issues_helper.rb
===================================================================
--- app/helpers/issues_helper.rb    (revision 4244)
+++ app/helpers/issues_helper.rb    (working copy)
@@ -70,6 +70,7 @@
              content_tag('td', check_box_tag("ids[]", child.id, false, :id => nil), :class => 'checkbox') +
              content_tag('td', link_to_issue(child, :truncate => 60), :class => 'subject') +
              content_tag('td', h(child.status)) +
+             content_tag('td', h(child.estimated_hours)) +
              content_tag('td', link_to_user(child.assigned_to)) +
              content_tag('td', progress_bar(child.done_ratio, :width => '80px')),
              :class => "issue issue-#{child.id} hascontextmenu #{level > 0 ? "idnt idnt-#{level}" : nil}")

    (1-3/3)