ChiliProject is not maintained anymore. Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.
search#index raises NoMethodError for #event_datetime (Bug #531)
Description
In our ChiliProject implementation we were seeing some weird errors when doing searches. Doing some research into it, here's what I found:
- search#index gets results and calls
#sort
on them with a block that comparesIssue#event_datetime
#event_datetime
is defined via https://github.com/chiliproject/chiliproject/blob/master/vendor/plugins/acts_as_journalized/lib/redmine/acts/journalized/deprecated.rb#L38-57 and makes a call toreset_journal_changes
andreset_journal
- this appears to make a
#save
happen because a custom life-cycle hook was being triggered. In that hook, a method is called on a value that isnil
, which raises an error and oddly bubbles up to the NoMethodError
I don't have enough context into the AAJ changes, but it seems like the scope of event_*
methods that get set to use the reset_journal
implementation could be too wide.
As a short term fix we're adding nil checks to our custom life-cycle hooks, but I feel like this could be a problem for others.
History
Updated by Felix Schäfer at 2011-08-25 04:37 pm
There's been some work done on aaj in 2.1.0, do you still have the same errors?
Updated by Ryan Briones at 2011-08-26 09:16 pm
This hasn't happened to us in a long time since we've worked around the issue. Unfortunately today is my last day at this client. I'll point them to this thread in case there are any issues going forward that this can solve.
Updated by Holger Just at 2011-12-18 06:14 pm
Closing as of inactivity. This issue seems to be fixed with the recent aaj changes.
If there should still be some edge case, please re-open this issue.
- Status changed from Open to Closed