Project

General

Profile

Actions

Feature #6276

closed

Gantt Chart rewrite

Added by Eric Davis about 14 years ago. Updated over 13 years ago.

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

100%

Estimated time:
Resolution:
Fixed

Description

I've rewritten most of the Gantt chart in Redmine for a client. Basically it makes the Gantt chart support nested charts. There are so many changes, I think a picture is easier to explain.

(Some) Features not shown in the image:

  • Cross project versions
  • New start and end graphics
  • Gravatars for assigned issues
  • Items ordered by due date, start date, and then id
  • Completion bars for Versions and Projects (showing how far along they are)

The PNG and PDF exports are also updated. Though the PDF export still has several bugs in it (many were present before this rewrite).

I'm going to be adding this into trunk for Redmine 1.1. If there are any heavy Gantt chart users who can help test this out, I would appreciate the feedback.


Files

nested-gantt-chart.png (220 KB) nested-gantt-chart.png Example nested Gantt chart (annotated) Eric Davis, 2010-09-03 00:47
gantt.rb-1day-coloring.patch (1.38 KB) gantt.rb-1day-coloring.patch fixes coloring of the issues with the same start and end date (1-day tasks) Pavel Shalagin, 2011-02-25 10:11

Related issues

Related to Redmine - Defect #6350: New Gantt charts : 500 error when no issue have a due dateClosed2010-09-10

Actions
Related to Redmine - Defect #6348: Gantt chart PDF rendering errorsClosed2010-09-10

Actions
Related to Redmine - Defect #7335: Sorting issues in gantt by date, not by idClosedToshi MARUYAMA2011-01-15

Actions
Related to Redmine - Feature #4786: Gantt Chart - Grouping issues by target versionClosed2010-02-10

Actions
Precedes Redmine - Feature #2024: gantt chart editingNew

Actions
Actions #1

Updated by yusuke kokubo about 14 years ago

+1
looks nice.

Actions #2

Updated by Igor Balk about 14 years ago

yusuke kokubo wrote:

+1
looks nice.

Agreed. Ultimately would be nice to make them editable ie have drag and drop functionality for tasks so you can move them around the chart with you mouse and it will get reflected in the issues.

Actions #3

Updated by Jean-Baptiste Barth about 14 years ago

Looks really nice ! I know some users at my work who are not really happy with current gantt charts, I will relay their feedback as soon as it's in trunk.

Actions #4

Updated by Curtis Stewart about 14 years ago

We use the gantt charts all of the time. Versions are cross-cutting the projects and sub-projects and then we try to roll up to a top level application project. Having a good gantt at the top (like your picture) would really help. While not mentioned in your write-up, don't forget the filtering of tasks (I am sure that it was just cut off of your picture). One of the selling points of Redmine is the ability to filter and organize the issues the way I want, when I want.

If a version is shared outside of one project, how it is shown on the gantt? Do the issues stay with the version or the project on the display?

Do you need the ability to display the project or version on the text of the task or is it a mouse-over that displays the issue details?

Nice job.....

Actions #5

Updated by Eric Davis about 14 years ago

Igor Balk wrote:

Agreed. Ultimately would be nice to make them editable ie have drag and drop functionality for tasks so you can move them around the chart with you mouse and it will get reflected in the issues.

That would be nice but since the charts are "drawn" using HTML spans, it would be difficult to write. I'd accept a patch for it though.

Curtis Stewart wrote:

While not mentioned in your write-up, don't forget the filtering of tasks (I am sure that it was just cut off of your picture). One of the selling points of Redmine is the ability to filter and organize the issues the way I want, when I want.

Yea, that's included. Before showing the issues they are filtered by the current Query.

If a version is shared outside of one project, how it is shown on the gantt? Do the issues stay with the version or the project on the display?

The shared version would appear under it's project. Then issues assigned to it will be shown. Example:

  • Version 1.0 on Project A
    • Issue 100 (on Project A)
    • Issue 101 (on Project A)
    • Project B - Issue 102

Do you need the ability to display the project or version on the text of the task or is it a mouse-over that displays the issue details?

There are tooltips that appear when hovering on an issue (like the existing Gantt). I don't remember if Versions or Projects have tooltips also.

Actions #6

Updated by Arnaud Martel about 14 years ago

Great job!!
I didn't see subtasks but I suppose they are also displayed under the parent task...
I just have one wish: I had to patch the gantt controller to change the way items are ordered (id first, to have items sorted by creation date...) and it will be great if you add the ability to choose how items are sorted.
I will test it as soon as it's in trunk.

Actions #7

Updated by Curtis Stewart about 14 years ago

Great.
Has long as I can figure out which project a task is under when we are doing version work this will really help.

Actions #8

Updated by Igor Balk about 14 years ago

One more thing I would suggest adding is ability to display estimated time vs actual time or just estimated time

Actions #9

Updated by Bruno Samora about 14 years ago

Eric, the Gantt looks perfect!

Actions #10

Updated by Igor Balk about 14 years ago

Eric Davis wrote:

Igor Balk wrote:

Agreed. Ultimately would be nice to make them editable ie have drag and drop functionality for tasks so you can move them around the chart with you mouse and it will get reflected in the issues.

That would be nice but since the charts are "drawn" using HTML spans, it would be difficult to write. I'd accept a patch for it though.

We are thinking about redoing it using Ajax but still not sure about that. Might as well as just do REST client or plugin.

Actions #11

Updated by Eric Davis about 14 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Committed the new Gantt chart in r4072, r4073, and r4074.

If you find any bugs, please report them as new bugs and assign them to me. I want to make sure everything gets fixed and don't want to lose any new bug reports that might be posted to this issue.

Actions #12

Updated by Rodrigo Guerrero about 14 years ago

Eric, I update redmine and show me this error with I try to see the gantt:

Processing GanttsController#show (for 192.168.0.100 at 2010-09-10 08:48:46) [GET]
Parameters: {"project_id"=>"TT-09-637-F", "action"=>"show", "controller"=>"gantts"}
Rendering template within layouts/base
Rendering gantts/show

ActionView::TemplateError (undefined method `<=' for nil:NilClass) on line #155 of app/views/gantts/show.html.erb:
152:
153: <% top = headers_height + 10 >
154:
155: <
= @gantt.lines(:top => top, :zoom => zoom, :g_width => g_width ) >
156:
157: <

158: #

lib/redmine/helpers/gantt.rb:301:in `line_for_project'
lib/redmine/helpers/gantt.rb:172:in `render_project'
lib/redmine/helpers/gantt.rb:194:in `render_project'
lib/redmine/helpers/gantt.rb:193:in `render_project'
lib/redmine/helpers/gantt.rb:151:in `lines'
app/views/gantts/show.html.erb:155
app/controllers/gantts_controller.rb:26
app/controllers/gantts_controller.rb:25:in `show'
passenger (2.2.9) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
passenger (2.2.9) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
passenger (2.2.9) lib/phusion_passenger/utils.rb:184:in `safe_fork'
passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:349:in `handle_spawn_application'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:163:in `start'
passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /redmine_ny2/public/500.html (500 Internal Server Error)

Actions #13

Updated by Igor Kalashnikov about 14 years ago

The same for me. Error is thrown not on all projects.

Processing GanttsController#show (for 172.16.1.195 at 2010-09-10 14:22:47) [GET]
  Parameters: {"action"=>"show", "controller"=>"gantts"}
Rendering template within layouts/base
Rendering gantts/show

ActionView::TemplateError (undefined method `<=' for nil:NilClass) on line #155 of app/views/gantts/show.html.erb:
152:
153: <% top = headers_height + 10 %>
154:
155: <%= @gantt.lines(:top => top, :zoom => zoom, :g_width => g_width ) %>
156:
157: <%
158: #

    lib/redmine/helpers/gantt.rb:301:in `line_for_project'
    lib/redmine/helpers/gantt.rb:172:in `render_project'
    lib/redmine/helpers/gantt.rb:194:in `render_project'
    lib/redmine/helpers/gantt.rb:193:in `render_project'
    lib/redmine/helpers/gantt.rb:154:in `lines'
    lib/redmine/helpers/gantt.rb:153:in `lines'
    app/views/gantts/show.html.erb:155
    app/controllers/gantts_controller.rb:26:in `show'
    app/controllers/gantts_controller.rb:25:in `show'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /opt/redmine/public/500.html (500 Internal Server Error)
Actions #14

Updated by Anonymous about 14 years ago

This happens when none of the issues in a project have a due date set. I created a quick patch, see also Issue #6350

Actions #15

Updated by Eric Davis about 14 years ago

Eric Davis wrote:

If you find any bugs, please report them as new bugs and assign them to me. I want to make sure everything gets fixed and don't want to lose any new bug reports that might be posted to this issue.

Please please please, open new issues if you find bugs. I cannot stress this enough. Posting the bugs to this issue will cause them to get lost, and then they will help no one.

Actions #16

Updated by Mischa The Evil about 14 years ago

Eric Davis wrote:

Igor Balk wrote:

Agreed. Ultimately would be nice to make them editable ie have drag and drop functionality for tasks so you can move them around the chart with you mouse and it will get reflected in the issues.

That would be nice but since the charts are "drawn" using HTML spans, it would be difficult to write. I'd accept a patch for it though.

Eric, have you reviewed the patches from #2024? Would such be easy to adopt and maintained post Gantt-rewrite?

Actions #17

Updated by Pavel Shalagin over 13 years ago

Eric, thank you very much for the Gantt update - like it much better than the previous one.

Don't know if it can be considered as a problem, but -
the tasks with the same start_date and end_date seems not to be colored of progress and late correctly on the diagram. They all are just grey.

I would suggest some changes (please see the patch).

Cheers,
Pavel

Actions #18

Updated by Go MAEDA over 7 years ago

  • Related to Feature #4786: Gantt Chart - Grouping issues by target version added
Actions

Also available in: Atom PDF