suer / redmine_webhook

147 stars 81 forks source link

Error in Redmine4.0.2 #31

Open shawxue opened 4 years ago

shawxue commented 4 years ago

production.log:

Completed 200 OK in 927ms (Views: 606.6ms | ActiveRecord: 116.0ms)
Started PATCH "/redmine/issues/1" for 127.0.0.1 at 2019-12-05 14:27:46 +0800
Processing by IssuesController#update as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"87JVACx4VpY9Hg7lMtFEsBnYipT3KM/Am1FQsh25OOmZiN9lFbsle+fys8/VVORKoZI65d4yUoQSNteXkAp/Fw==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "tracker_id"=>"1", "subject"=>"Test", "description"=>"", "status_id"=>"1", "priority_id"=>"2", "assigned_to_id"=>"", "parent_issue_id"=>"", "start_date"=>"2019-12-05", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "notes"=>"test", "private_notes"=>"0", "lock_version"=>"0"}, "was_default_status"=>"1", "time_entry"=>{"hours"=>"", "activity_id"=>"", "comments"=>""}, "last_journal_id"=>"", "commit"=>"Submit", "issue_position"=>"1", "issue_count"=>"1", "id"=>"1"}
  Current user: admini (id=1)
Completed 500 Internal Server Error in 238ms (ActiveRecord: 66.1ms)

NameError (uninitialized constant RedmineWebhook::ProjectWrapper
Did you mean?  ProjectsHelper):

plugins/redmine_webhook/lib/redmine_webhook/issue_wrapper.rb:24:in `to_hash'
plugins/redmine_webhook/lib/redmine_webhook/webhook_listener.rb:70:in `journal_to_json'
plugins/redmine_webhook/lib/redmine_webhook/webhook_listener.rb:31:in `controller_issues_edit_after_save'
lib/redmine/hook.rb:61:in `block (2 levels) in call_hook'
lib/redmine/hook.rb:61:in `each'
lib/redmine/hook.rb:61:in `block in call_hook'
lib/redmine/hook.rb:58:in `tap'
lib/redmine/hook.rb:58:in `call_hook'
lib/redmine/hook.rb:91:in `call_hook'
app/controllers/issues_controller.rb:565:in `block in save_issue_with_child_records'
app/controllers/issues_controller.rb:552:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:169:in `update'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
shawxue commented 4 years ago

i don't know ruby but updated the redmine_webhook.rb it worked. ( it's ok in the redmine 4.0.5)