Project

General

Profile

Error #435

Adv. Roadmap 0.4.0: still Internal Server error on Redmine 1.1.0 and Backlogs Plugin enabled

Added by Matthias Neubert over 13 years ago. Updated over 13 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
2011-03-03
Due date:
% Done:

0%

Estimated time:
Source:
Detected on version:
Redmine version:
Milestones:

Description

Hello I tried 0.4.0 with current backlogs combined in our test system with a fresh copy
of the productive database

again I receive [1] When disabling advanced roadmap plugin in the same configuration,
the "normal" redmine roadmap works proper. I still don't know what specific property of our issues
causes the problem, but it seems very necessary to make advanced roadmap more robust.

If you need more information for this, please ask, I will try to figure it out.

thanks
Matthias

[1]

ActionView::TemplateError (NaN) on line #17 of app/views/versions/_overview.rhtml:
14: </ul>
15:
16: <% if version.fixed_issues.count > 0 >
17: <= progress_bar([version.closed_pourcent, version.completed_pourcent], :width => '40em', :legend => ('%0.0f%' % version.completed_pourcent)) >
18: <p class="progress-info">
19: <= link_to_if(version.closed_issues_count > 0, l(:label_x_closed_issues_abbr, :count => version.closed_issues_count), :controller => 'issues', :action => 'index', :project_id => version.pro$
20: (<%= '%0.0f' % (version.closed_issues_count.to_f / version.fixed_issues.count * 100) %>%)

app/helpers/application_helper.rb:773:in `collect'
app/helpers/application_helper.rb:773:in `progress_bar'
app/views/versions/_overview.rhtml:17:in `_run_rhtml_app47views47versions47_overview46rhtml_locals_object_overview_version'
vendor/plugins/advanced_roadmap.0.4.0/app/views/versions/_info.html.erb:1
vendor/plugins/advanced_roadmap.0.4.0/app/views/versions/index.html.erb:10
vendor/plugins/advanced_roadmap.0.4.0/app/views/versions/index.html.erb:8:in `each'
vendor/plugins/advanced_roadmap.0.4.0/app/views/versions/index.html.erb:8
/usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
/usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
/usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
/usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
/usr/lib/phusion_passenger/passenger-spawn-server:61

hence the problem isn't solved in 0.4.0 . It appears allways on backlogs enabled plugins when clicking on "Roadmap"

#1

Updated by Manuel Vázquez over 13 years ago

I have had the same issue on both Redmine 1.1.x and Redmine 1.0.5. The exception happens when all closed issues have no spent time recorded.

My fix was to change line 87 of version_patch.rb from this:

if total_spent + total_partial_pending + total_full_pending > 0.0

to this:

if total_spent + total_partial_pending + total_full_pending > 0.0 && @progress_factor != 0

This makes the exception go away, but I haven't really think about the implications. Maybe the lines that must be change are these:

@total_finished_ratio /= (total_spent + @total_pending)
@total_ratio /= (total_spent + @total_pending)

Also available in: Atom PDF