railsant/redmine_harvest_timelog — Issue #1: Running into an issue on Timelog entry
Author: sbrisko
Created: 2011-10-11 18:25:12+00:00
State: open

Hello,

We have the plugin setup on a server running the latest version of Redmine (1.2.1) on REE (ruby 1.8.7 (2010-04-19 patchlevel 253) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2010.02). Everything installed okay, migration run, Harvest to Redmine custom field mappings done, but when we go to save a time log entry, we are running into errors.

```
Processing TimelogController#create (for 173.12.175.89 at 2011-10-11 11:18:38) [POST]
Parameters: {"time_entry"=>{"comments"=>"", "issue_id"=>"12150", "activity_id"=>"18", "spent_on"=>"2011-10-11", "hours"=>".25"}, "back_url"=>"https%3A%2F%2Fissues.afinedevelopment.com%2Fissues%2F12150", "commit"=>"Save", "project_id"=>"twinfarms", "action"=>"create", "authenticity_token"=>"dDpDk06MepSTg4o/ZBKhhVieiTaX6UKokZ468e8IySM=", "controller"=>"timelog"}

NoMethodError (undefined method `value' for nil:NilClass):
vendor/plugins/redmine_harvest_timelog/init.rb:52:in `evaluate_init_rb'
app/controllers/timelog_controller.rb:121:in `create'
```

We do have the redmine activities mapped to harvest task id, and from the console I can run the same code as line 52 from init.rb and the detect block does return a value and not nil, so I am not sure why it's failing.