Closed shuozhifenxi closed 11 years ago
I tried to comment the rescue part, and get an error
ActiveRecord::StatementInvalid (Mysql2::Error: Unknown column 'time_logs.tt_log_start_date' in 'where clause': SELECT COUNT(time_logs
.id
) FROM time_logs
WHERE (1 = 1) AND (time_logs.bookable = 1 AND (time_logs.tt_log_start_date > '2012-12-31 23:59:59' AND time_logs.tt_log_start_date <= '2013-12-31 23:59:59'))):
Seems like an old bug, will fix it
this is fixed with the newest commit
Thank you.
Hi,
I get Internal error when using date filter on time logs.
The error message in log is as below:
NameError (uninitialized constant ActiveRecord::AttributeMethods::Query::StatementInvalid): plugins/redmine_time_tracker/app/models/time_log_query.rb:65:in
rescue in log_count' plugins/redmine_time_tracker/app/models/time_log_query.rb:60:in
log_count' plugins/redmine_time_tracker/app/controllers/tt_logs_list_controller.rb:30:inindex' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:in
send_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:167:inprocess_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:in
process_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:inblock in process_action' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:480:in
_run4508221329981161724process_action4401537402551449194callbacks' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in__run_callback' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:in
process_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:inprocess_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:in
block in process_action' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:inblock in instrument' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in
instrument' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:in
process_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' vendor/cache/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:in
process_action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/base.rb:121:inprocess' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:in
process' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal.rb:203:indispatch' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:in
dispatch' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_controller/metal.rb:246:inblock in action' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:indispatch' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in
call' vendor/cache/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:inblock in call' vendor/cache/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in
each' vendor/cache/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:incall' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in
call' vendor/cache/ruby/1.9.1/gems/rack-openid-1.3.1/lib/rack/openid.rb:98:incall' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:in
call' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:incall' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:25:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:incall' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:incall' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in
context' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:incall' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in
call' vendor/cache/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/query_cache.rb:64:incall' vendor/cache/ruby/1.9.1/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:inblock in call' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
_run1388863021944427750call2102345956143037350callbacks' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:405:in__run_callback' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:385:in
_run_call_callbacks' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:incall' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:incall' vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/logger.rb:32:in
call_app' vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:inblock in call' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:in
tagged' vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/rack/logger.rb:16:incall' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:in
call' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:incall' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in
call' vendor/cache/ruby/1.9.1/gems/activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:incall' vendor/cache/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in
call' vendor/cache/ruby/1.9.1/gems/actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:incall' vendor/cache/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in
forward' vendor/cache/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:infetch' vendor/cache/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in
lookup' vendor/cache/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:incall!' vendor/cache/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in
call' vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/engine.rb:479:incall' vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/application.rb:223:in
call' vendor/cache/ruby/1.9.1/gems/railties-3.2.13/lib/rails/railtie/configurable.rb:30:inmethod_missing' passenger (4.0.5) lib/phusion_passenger/rack/thread_handler_extension.rb:77:in
process_request' passenger (4.0.5) lib/phusion_passenger/request_handler/thread_handler.rb:140:inaccept_and_process_next_request' passenger (4.0.5) lib/phusion_passenger/request_handler/thread_handler.rb:108:in
main_loop' passenger (4.0.5) lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'