Actions
Defect #6904
closedIssue Context Menu- Log Time Broken
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Time tracking
Target version:
-
Start date:
2010-11-16
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
While viewing /project/[XXXXX]/issues, if you right click on an issue and select 'Log Time', you get the following error message:
NoMethodError in TimelogController#edit You have a nil object when you didn't expect it! You might have expected an instance of ActiveRecord::Base. The error occurred while evaluating nil.attributes= RAILS_ROOT: /Projects/Ruby/Rails/redmine /Projects/Ruby/Rails/redmine/app/controllers/timelog_controller.rb:113:in `edit'
This is because @time_entry is never initialized, because the line that initialized it was removed in r4248
In r4248, line 114 was removed, the line was
@time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => User.current, :spent_on => User.current.today)
If this line is added back in, the context menu works correctly.
I've added a patch to correct this issue
Files
Actions