Project

General

Profile

Actions

Defect #4856

closed

roadmap display crashes when a ticket has 'Estimated Time' too big

Added by Jérôme Bousquié over 14 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Roadmap
Target version:
-
Start date:
2010-02-17
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Hello,

One of my user entered a very high value on a ticket estimated time (something like 1E+17).
This (stupid) value produces an internal error on the request for displying the roadmap.

I setup the estimated to a better value and the bug disappeared.

Here's the part of production log :

Processing ProjectsController#roadmap (for 193.54.203.133 at 2010-02-17 11:25:55) [GET]
  Parameters: {"action"=>"roadmap", "id"=>"serinfo", "controller"=>"projects"}
Rendering template within layouts/base
Rendering projects/roadmap

ActionView::TemplateError (Invalid big Decimal Value) 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.project, :status_id => 'c', :fixed_version_id => version, :set_filter => 1) %>
20:         (<%= '%0.0f' % (version.closed_issues_count.to_f / version.fixed_issues.count * 100) %>%)

    config/initializers/bigdecimal-segfault-fix.rb:26:in `BigDecimal'
    /usr/lib/ruby/1.8/bigdecimal/util.rb:26:in `to_d'
    app/models/version.rb:179:in `estimated_average'
    app/models/version.rb:201:in `issues_progress'
    app/models/version.rb:94:in `closed_pourcent'
    app/views/versions/_overview.rhtml:17:in `_run_rhtml_app47views47versions47_overview46rhtml_locals_object_overview_version'
    app/views/projects/roadmap.rhtml:9:in `_run_rhtml_app47views47projects47roadmap46rhtml'
    app/views/projects/roadmap.rhtml:7:in `each'
    app/views/projects/roadmap.rhtml:7:in `_run_rhtml_app47views47projects47roadmap46rhtml'

Related issues

Related to Redmine - Defect #7826: bigdecimal-segfault-fix.rb must be removed for OracleClosedJean-Philippe Lang2011-03-10

Actions
Actions

Also available in: Atom PDF