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 #1

Updated by Jean-Philippe Lang over 14 years ago

  • Category set to Roadmap
Actions #2

Updated by Jean-Baptiste Barth about 14 years ago

Maybe we could just hard code a limit to the estimated time value, this is the simpliest way to fix that. Let's say Redmine should prevent you from enter a number greater than 1000 or 10000 hours. What do you think ?

Actions #3

Updated by Grigory Petrov almost 14 years ago

1000 hours can lurk in real project. I think limit must be something that is guaranteed not being treated as valid value. Like 100 years = 100 * 365 * 24 ~ 1_000_000 hours.

Actions #4

Updated by Eric Palmitesta almost 13 years ago

This error also occurs when using a value of 0.0001

Actions #5

Updated by Go MAEDA over 9 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed by #7826 (Redmine 1.4.0). bigdecimal-segfault-fix.rb was removed.

I entered 1E+17 to estimated time and successfully opened VersionsController#show on Redmine 3.0.0.

Actions #6

Updated by Go MAEDA over 9 years ago

  • Related to Defect #7826: bigdecimal-segfault-fix.rb must be removed for Oracle added
Actions

Also available in: Atom PDF