ujiro99 / RedmineTimeTracker

Chrome/Electron app for tracking work time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

作業時間の登録に失敗する

gorimaru opened this issue · comments

問題

time_entries.json への POSTリクエストに失敗しています。
RedmineのProduction.logには、以下が記録されます。


Started POST "/issues/2993/time_entries.json" for 172.30.253.92 at Thu Mar 20 10:56:23 +0900 2014
Processing by TimelogController#create as JSON
Parameters: {"time_entry"=>{"comments"=>"Time Tracking", "issue_id"=>"2993", "activity_id"=>"9", "hours"=>"1"}, "issue_id"=>"2993"}
WARNING: Can't verify CSRF token authenticity
Current user: anonymous
Filter chain halted as :authorize rendered or redirected
Completed 401 Unauthorized in 10ms (ActiveRecord: 1.3ms)

環境

Environment:
Redmine version 2.2.3.stable
Ruby version 1.8.7 (i686-linux)
Rails version 3.2.12
Environment production
Database adapter MySQL
Redmine plugins:
redmine_ckeditor 0.3.0
redmine_didyoumean 1.2.0
redmine_mailwrapper 0.1.2
redmine_plugin_views_revisions 0.0.1
redmine_watcher_groups 0.0.2git
redmine_xls_export 0.2.1
sidebar_hide 0.0.2

Authenticating with API key, projects and issues lists are loading successfully:

Started GET "/issues.json?limit=25&page=1&project_id=1" for 192.168.132.35 at 2015-05-21 06:55:28 +0300
Processing by IssuesController#index as JSON
  Parameters: {"limit"=>"25", "page"=>"1", "project_id"=>"1"}
  Current user: infoman (id=1)
  Rendered issues/index.api.rsb (35.2ms)
Completed 200 OK in 423ms (Views: 35.5ms | ActiveRecord: 35.6ms)

But time entries submission fails:

Started POST "/issues/578/time_entries.json" for 192.168.132.35 at 2015-05-21 06:53:36 +0300
Processing by TimelogController#create as JSON
  Parameters: {"time_entry"=>{"issue_id"=>"578", "hours"=>"0.06", "activity_id"=>"9", "comments"=>"test test test"}, "issue_id"=>"578"}
  Current user: anonymous
Filter chain halted as :authorize_global rendered or redirected
Completed 401 Unauthorized in 277ms (ActiveRecord: 11.3ms)
Environment:
  Redmine version                3.0.2.stable
  Ruby version                   2.0.0-p645 (2015-04-13) [x86_64-linux]
  Rails version                  4.2.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.11
  Mercurial                      3.3.2
  Git                            2.3.6
  Filesystem                     
Redmine plugins:
  redmine_lightbox2              0.2.2
  redmine_theme_changer          0.2.0