Project

General

Profile

Project overview Scrum Stats - Server Error 500

Added by Maria Hedberg over 6 years ago

We get an error when clicking Scrum stats on the project overview page. Only people with role "manager" get the error, others can view the statistics.

Gives the following error message

Completed 500 Internal Server Error in 6157ms (ActiveRecord: 300.1ms)

ArgumentError (comparison of Date with nil failed):
  plugins/scrum/app/models/sprint.rb:106:in `>='
  plugins/scrum/app/models/sprint.rb:106:in `block in time_entries_by_activity'
  plugins/scrum/app/models/sprint.rb:104:in `each'
  plugins/scrum/app/models/sprint.rb:104:in `time_entries_by_activity'
  plugins/scrum/lib/scrum/project_patch.rb:120:in `block in sps_by_pbi_field'
  plugins/scrum/lib/scrum/project_patch.rb:119:in `sps_by_pbi_field'
  plugins/scrum/lib/scrum/project_patch.rb:85:in `effort_by_activity'
  plugins/scrum/app/controllers/scrum_controller.rb:260:in `stats'
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'

Even if this bug might have appeared because of our using the tool in the wrong way, I wonder if you have any tip on how to find the error in the database and fix it.

It seems to be dying on this code:

if time_entry.activity and time_entry.hours > 0.0 and
  time_entry.spent_on >= sprint_start_date and time_entry.spent_on <= sprint_end_date

Kind regards,
Maria


Replies (1)

RE: Project overview Scrum Stats - Server Error 500 - Added by Emilio González Montaña over 6 years ago

Ummmm, it seems that one of this is happening:
  • A time entry in the DB has spent_on date to nil --> this should not happen.
  • Sprint start date is nil --> this also should not happen.

Both conditions should not happen due Rails model validations... but it's happening, so you could find the conflictive record in your DB & fix it...

If you need support to install or configure, please consider support this project via Patreon.

    (1-1/1)