Projects Tree View Plugin - Version 0.0.1

Added by Chris Peterson over 10 years ago

This plugin will turn the projects index view into a tree view that can be expanded and collapsed. It propagates the tree view to the project show page's subprojects list.

Install Instructions:

1) Extract projects_tree_view.zip to /path/to/redmine/vendor/plugins/
2) Restart Redmine
3) Enjoy Project Tree Goodness!

Replies (127)

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Babbo Maria over 9 years ago

With 1.0.0 turnkey upgraded I get 500 error. I have tried to mix all version original, git and tried to apply patch changed file etc. 40 tests and 500 error

Can someone tell the step to obtain a working copy of plugin.
for example:
1)download from git or download the zip at the start
2)make this modification
2b)if you wont this do this
3)restart

Or post the tar/zip of his working copy of tree plugin folder.

Thanks!

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Krzysztof B about 9 years ago

Got an error with this plugin, Redmine 1.0.0.stable.4010 (SQLite):

Processing ProjectsController#show (for 89.77.49.205 at 2010-09-01 01:10:25) [GET]
  Parameters: {"action"=>"show", "id"=>"modx", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/show

ActionView::TemplateError (undefined method `any?' for nil:NilClass) on line #82 of vendor/plugins/projects_tree_view/app/views/projects/show.rhtml:
79:   </div>
80:   <% end %>
81:
82:     <% if @members_by_role.any? %>
83:     <div class="box">
84:             <h3 class="icon22 icon22-users"><%=l(:label_member_plural)%></h3>
85:             <p><% @members_by_role.keys.sort.each do |role| %>

    vendor/plugins/projects_tree_view/app/views/projects/show.rhtml:82:in `_run_rhtml_vendor47plugins47projects_tree_view47app47views47projects47show46rhtml'
    app/controllers/projects_controller.rb:165:in `show'
    /dh/passenger/lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    /dh/passenger/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/utils.rb:184:in `safe_fork'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:349:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:163:in `start'
    /dh/passenger/lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /dh/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
    /dh/passenger/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /dh/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /home/chanibal/redmine.chanibal.pl/public/500.html (500 Internal Server Error)

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Babbo Maria about 9 years ago

Krzysztof B wrote:

Got an error with this plugin, Redmine 1.0.0.stable.4010 (SQLite):

[...]

plugin here is dead and old if you read all the comment you can find a git repository where the original code has been cloned, then git has been forked a lot; so if you follow the various forks, you can fin a working version. I havn't try it but if you find a working version could you post it on this discussion.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Daniel Herrera about 9 years ago

The version 0.0.4 from dem (https://github.com/dem/projects_tree_view/archives/0.0.4) works fine in Redmine 1.0.0 stable. Below you will find attached the zip file with a full functional project tree plugin for 1.0.X.

Upgrade to Redmine 1.0.3 - Added by Harald Klimach about 9 years ago

Hi,
after upgrading to Redmine 1.0.3, I ran into this issue:
http://www.redmine.org/boards/2/topics/18862

The action for new projects changed from "add" to "new", and
the plugin needs to be adapted accordingly.

RE: Projects Tree View Plugin - Version 0.0.4 - Added by Babbo Maria about 9 years ago

I have made the change and update the plugin *REMEMBER TO USE THIS ONLY IN version >= 1.0.2 *

projects_tree_view_.0.2_.zip - Packed Version tested in 1.0.2 (45.1 KB)

RE: Projects Tree View Plugin - Version 0.0.4 - Added by Babbo Maria about 9 years ago

Babbo Maria wrote:

I have made the change and update the plugin *REMEMBER TO USE THIS ONLY IN version >= 1.0.2 *

Ok another bug in subproject has been corrected.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Matt Michielsen about 9 years ago

I also just fixed the "Overall activity" link, which was pointing at the wrong controller.

https://github.com/mattmichielsen/projects_tree_view

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Joseph Potvin about 9 years ago

Hey it's beautiful Babbo etc. We just put it up under our Redmine instance in the Canadian Government http://tbs-sct.ircan.gc.ca/projects?lang=eng (which also implements a bunch of other UI changes http://tbs-sct.ircan.gc.ca/projects/show/redmine-clf2 )

Thanks for picking up the ball recently. With close to 100 projects, many of which are sub- or sub-sub-projects, our list was getting unwieldy.

Joseph Potvin
Coordinator, Intellectual Resources Canada | Coordinateur, Ressources Intellectuelles Canada
Information Technology Division | Division d'infotechnolgie
Chief Information Officer Branch | Direction du dirigeant principal de l'information
Treasury Board of Canada Secretariat | Secrétariat du Conseil du Trésor du Canada
Ottawa, Canada K1A 0R5
Joseph.PotvinATtbs-sct.gc.ca (change AT to @)
Telephone | Téléphone 613-941-4626
Government of Canada | Gouvernement du Canada

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Jani Tiainen about 9 years ago

Apparently plugin is not 1.0.3 compatible project index does refer to incorrect controllers causing nasty 404 errors.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Babbo Maria about 9 years ago

Jani Tiainen wrote:

Apparently plugin is not 1.0.3 compatible project index does refer to incorrect controllers causing nasty 404 errors.

I can't find the position of project index. Coud you take a snpshot (obfuscated if you can't share information about project) where you mark the broke link.
I think that i can made something the 24th. Surely other users can help you with this plugin!

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Babbo Maria about 9 years ago

Joseph Potvin wrote:

Hey it's beautiful Babbo etc. We just put it up under our Redmine instance in the Canadian Government http://tbs-sct.ircan.gc.ca/projects?lang=eng (which also implements a bunch of other UI changes http://tbs-sct.ircan.gc.ca/projects/show/redmine-clf2 )

Thanks for picking up the ball recently. With close to 100 projects, many of which are sub- or sub-sub-projects, our list was getting unwieldy.

Joseph Potvin
Coordinator, Intellectual Resources Canada | Coordinateur, Ressources Intellectuelles Canada
Information Technology Division | Division d'infotechnolgie
Chief Information Officer Branch | Direction du dirigeant principal de l'information
Treasury Board of Canada Secretariat | Secrétariat du Conseil du Trésor du Canada
Ottawa, Canada K1A 0R5
Joseph.PotvinATtbs-sct.gc.ca (change AT to @)
Telephone | Téléphone 613-941-4626
Government of Canada | Gouvernement du Canada

Yea your site is very interesting I also think that this plugin should be the default interface for redmine projecs (in administration there is a tree view).
Stay tuned on this page because user has found other 2 bugs an ASAP there will be a new version.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Matt Michielsen about 9 years ago

Babbo Maria wrote:

Jani Tiainen wrote:

Apparently plugin is not 1.0.3 compatible project index does refer to incorrect controllers causing nasty 404 errors.

I can't find the position of project index. Coud you take a snpshot (obfuscated if you can't share information about project) where you mark the broke link.
I think that i can made something the 24th. Surely other users can help you with this plugin!

I'm sure I could help otherwise if you provide more information. I don't appear to have the same problem on my 1.0.3 install. You also don't specify which fork/version of the plugin you're using.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Joseph Potvin about 9 years ago

Here's the patch for the 404 problem written by our admin, Patrick Naubert. I attach a txt file. Our instance seems to be working fine now. We would be grateful if others would advise if this resolves the issue completely your's.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Joseph Potvin about 9 years ago

Oops, this seems to break the tree functionality for IE on Windows. It's fine for Firefox on Gnome/Ubuntu. Stay tuned...

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Jani Tiainen about 9 years ago

Joseph Potvin wrote:

Here's the patch for the 404 problem written by our admin, Patrick Naubert. I attach a txt file. Our instance seems to be working fine now. We would be grateful if others would advise if this resolves the issue completely your's.

These are very same changes what I did on our version by hand. Wasn't that hard after all.
I think those changes were introduced in r4117 in 1.0-stable branch. And then it's somewhere in the trunk as well.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Matt Michielsen almost 9 years ago

I just rolled out 1.0-stable to production and my github fork (https://github.com/mattmichielsen/projects_tree_view) has those patches applied (and a fixed overall activity link) and appears to be working properly.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Ez Dakit almost 9 years ago

Matt, I've done 2 changes to get all working:

  • There is an </ul> in wrong place in redmine/vendor/plugins/projects_tree_view/app/views/projects/show.rhtml and the list of custom values in the project overview tab is wrongly placed (to the left) in firefox and IE.
  • I've had to change add por new en redmine/vendor/plugins/projects_tree_view/app/views/admin/projects.rhtml, to get the new project link in the administration/projects view.

FYI

thanks

projects.rhtml Magnifier (4.26 KB)

show.rhtml Magnifier (5.31 KB)

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Joji Okuyama almost 9 years ago

I coudn't delete project. So I changed this file.

  • redmine/vendor/plugins/projects_tree_view/app/views/admin/projects.rhtml
    <%= link_to(l(:button_delete), project_destroy_confirm_path(project), :class => 'icon icon-del') %>

thanks

projects.rhtml Magnifier (4.23 KB)

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Terence Mill over 8 years ago

Bug Reports to Redmine 1.1.1 compatibility

\app\views\projects\show.rhtml

Line 38
  • There is an not localized string "Sub projects"
  • After line 55 you shall insert
        <ul>
    and After line 60
        </ul>
    for better layout

Localization isn't implemented so far

app\views\admin\projects.rhtml

Line 84

    <%= link_to(l(:button_delete), { :controller => 'projects', :action => 'destroy', :id => project }, :class => 'icon icon-del') %>

must be replaced with
    <%= link_to(l(:button_delete), project_destroy_confirm_path(project), :class => 'icon icon-del') %>

that projects can be removed again

Line 56

    <% @project.custom_values.each do |custom_value| %>

with
<% @project.visible_custom_field_values.each do |custom_value| %>

Line 79 to 83

<% if authorize_global_implemented && User.current.allowed_to?(:view_calendar, @project, :global => true) %> | <%= link_to(l(:label_calendar), :controller => 'issues', :action => 'calendar', :project_id => @project) >
<
end >
<
if authorize_global_implemented && User.current.allowed_to?(:view_gantt, @project, :global => true) %> | <%= link_to(l(:label_gantt), :controller => 'issues', :action => 'gantt', :project_id => @project) >

with

<
if User.current.allowed_to?(:view_calendar, @project, :global => true) %> | <%= link_to(l(:label_calendar), :controller => 'calendars', :action => 'show', :project_id => @project) >
<
end >
<
if User.current.allowed_to?(:view_gantt, @project, :global => true) %> | <%= link_to(l(:label_gantt), :controller => 'gantts', :action => 'show', :project_id => @project) %>

Line 92 to 99

  <% if @users_by_role.any? %>
    <div class="members box">
        <h3><%=l(:label_member_plural)%></h3>    
        <p><% @users_by_role.keys.sort.each do |role| %>
        <%=h role %>: <%= @users_by_role[role].sort.collect{|u| link_to_user u}.join(", ") %><br />
        <% end %></p>
    </div>
    <% end %>

with
  <%= render :partial => 'members_box' %>

Line 115 and 116

    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'details', :project_id => @project}) %> |
    <%= link_to(l(:label_report), {:controller => 'timelog', :action => 'report', :project_id => @project}) %></p>

must be replaced with
    <p><%= link_to(l(:label_details), {:controller => 'timelog', :action => 'index', :project_id => @project}) %> |
    <%= link_to(l(:label_report), {:controller => 'time_entry_reports', :action => 'report', :project_id => @project}) %></p>

because time log path chnaged in redmine 1.1.1. Much better would be to use hooks inasteag overwriting defaults layouts!

Line 122

<%= auto_discovery_link_tag(:atom, {:action => 'activity', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
<pre>
with 
<pre>
<%= auto_discovery_link_tag(:atom, {:controller => 'activities', :action => 'index', :id => @project, :format => 'atom', :key => User.current.rss_key}) %>
</pre>

Would be nice if some cann apply or fork this changes.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Terence Mill over 8 years ago

For easy repalcement the files i changed!

projects.rhtml Magnifier (4.14 KB)

show.rhtml Magnifier (4.95 KB)

Strnge problem - Added by Babbo Maria over 8 years ago

Recently i have made a new redmine machine 1.0.2 to integrate all update to this plugin.
When i star from any version evrything works well in admin and inside a project i have the correct tree

so I watch LOG and....


ActionView::TemplateError (private method `gsub' called for nil:NilClass) on line #71 of vendor/plugins/projects_tree_view/app/views/projects/index.rhtml:
68:             <% end %> 
69:             <tr class="<%= classes %>" <%= rowid %> >
70:                 <td class="name"><%= "<span style=\"padding-left: " + (2*(ancestors.length-1)).to_s + "em;\"></span>" %><%= spanicon %><%= project.active? ? link_to(h(project.name), {:controller => 'projects', :action => 'show', :id => project}, :class => "project") : h(project.name) %><span <%= openonclick %> class="empty <%=User.current.member_of?(project) ? 'my-project' : nil%>">&nbsp</span></td>
71:                 <td <%= openonclick %> ><%= textilizable project.short_description.gsub(/\!.+\!/,""), :project => project %></td>
72:             </tr>
73:         <% end %>
74:     </tbody>

Someone know how to protect gsub from null value??

So i can release a package for version >=1.0.2 and <1.1.1

then i try to upgrade redmine and release >=1.1.1 version

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Jim McAleer over 8 years ago

How about an option to allow two or three levels of the tree to be visible. Or even all by default. Save a few clicks. So far I think its really good.

RE: Projects Tree View Plugin - Version 0.0.1 - Added by Babbo Maria over 8 years ago

I think this is not possible because you have to re engineering the entire plug-in, actually it has no DB support and it's an overloading of default interface.
I discourage to create an hard coded feature.

1 2 3 4 5 6 (51-75/127)