redmine-slack
redmine-slack copied to clipboard
Got 500 internal error when using Restful API
Create Issue through Restful API with empty description will cause 500
Started POST "/issues.xml" for 10.66.78.165 at 2016-01-13 18:17:41 +0800
Processing by IssuesController#create as XML
Parameters: {"issue"=>{"subject"=>"test", "project_id"=>"6", "priority_id"=>"3", "status_id"=>"1", "tracker_id"=>"6", "assigned_to_id"=>"3"}}
Current user: user (id=3)
Rendered mailer/_issue.text.erb (2.2ms)
Rendered mailer/issue_add.text.erb within layouts/mailer (2.8ms)
Rendered mailer/_issue.html.erb (1.3ms)
Rendered mailer/issue_add.html.erb within layouts/mailer (1.7ms)
Completed 500 Internal Server Error in 98ms (ActiveRecord: 14.3ms)
NoMethodError (undefined method `scan' for nil:NilClass):
plugins/redmine-slack/lib/redmine_slack/listener.rb:223:in `extract_usernames'
plugins/redmine-slack/lib/redmine_slack/listener.rb:216:in `mentions'
plugins/redmine-slack/lib/redmine_slack/listener.rb:13:in `controller_issues_new_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:142:in `create'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Hello, faced with the same issue. Is there any additional info regrading this? Maybe somebody already has a chance to fix it...
@NovikovViktor hi, for now I just always send a dummy description on api call, not exactly solving the bug, but keep things working.
@lessmind , thanks. We also have found this a few minutes ago :smiley: . Suppose that this should be fixed on plugin level, at least wit dummy check.
@sciyoshi we have prepared following PR as an workaround for following issue
Hello @sciyoshi seems that this issue could be closed according to accepted PR