speedy32129 / time_logger

Redmine Time logger plugin. More than likely there is only going to be one more public release. New version has new time logging with the option of multiple loggers running at the same time, fixes for excessive loggng, and a whole new look.
Other
58 stars 43 forks source link

500 error when trying to start a timer (Nothing Happens) #65

Open nano-cube opened 4 years ago

nano-cube commented 4 years ago

Similar to issue #33, but I am using the default theme.

I don't have exactly the permission Log Time, but I do have Log spent time, is that the same? image

I click to start the timer: image

Nothing happens, but this is the error I get in chrome JavaScript Console (when I try to start a timer):

jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24 
GET https://www.example.com/redmine/time_loggers/start?issue_id=2 500
  S.ajax @ jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24
  S.handleRemote @ jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24
  (anonymous) @ jquery-2.2.4-ui-1.11.0-ujs-5.2.3.js?1576844386:24

Admin Information:

Environment:
  Redmine version                4.1.0.stable
  Ruby version                   2.6.5-p114 (2019-10-01) [x86_64-linux]
  Rails version                  5.2.4.1
  Environment                    production
  Database adapter               PostgreSQL
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                sendmail
SCM:
  Git                            2.17.1
  Filesystem                     
Redmine plugins:
  periodictask                   4.1.0
  redmine_checklists             3.1.16
  redmine_indicator              0.2.10
  redmine_issue_dynamic_edit     0.6.9
  redmine_work_time              0.4.0
  time_logger                    0.5.4
Luckyvb commented 3 years ago
Completed 500 Internal Server Error in 8ms (ActiveRecord: 1.7ms)
ArgumentError (wrong number of arguments (given 2, expected 0..1)):
plugins/time_logger/app/models/time_logger.rb:15:in `initialize'
plugins/time_logger/app/controllers/time_loggers_controller.rb:18:in `start'
Luckyvb commented 3 years ago

diff --git a/app/models/time_logger.rb b/app/models/time_logger.rb index e50b01b..f2863d8 100644 --- a/app/models/time_logger.rb +++ b/app/models/time_logger.rb @@ -12,8 +12,9 @@ class TimeLogger < ActiveRecord::Base belongs_to :user has_one :issue