{"action":"created","issue":{"url":"https://api.github.com/repos/anteo/redmine_custom_workflows/issues/63","repository_url":"https://api.github.com/repos/anteo/redmine_custom_workflows","labels_url":"https://api.github.com/repos/anteo/redmine_custom_workflows/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/anteo/redmine_custom_workflows/issues/63/comments","events_url":"https://api.github.com/repos/anteo/redmine_custom_workflows/issues/63/events","html_url":"https://github.com/anteo/redmine_custom_workflows/issues/63","id":162613972,"number":63,"title":"Redmine 3.2.1 - Internal Server Error on new Issue","user":{"login":"andreav","id":1358304,"avatar_url":"https://avatars.githubusercontent.com/u/1358304?v=3","gravatar_id":"","url":"https://api.github.com/users/andreav","html_url":"https://github.com/andreav","followers_url":"https://api.github.com/users/andreav/followers","following_url":"https://api.github.com/users/andreav/following{/other_user}","gists_url":"https://api.github.com/users/andreav/gists{/gist_id}","starred_url":"https://api.github.com/users/andreav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreav/subscriptions","organizations_url":"https://api.github.com/users/andreav/orgs","repos_url":"https://api.github.com/users/andreav/repos","events_url":"https://api.github.com/users/andreav/events{/privacy}","received_events_url":"https://api.github.com/users/andreav/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-28T06:45:48Z","updated_at":"2016-07-28T06:44:46Z","closed_at":null,"body":"Hi,\r\nI'm trying this plugin on redmine 3.2.1 and I get Internal Server Error when saving a new issue.\r\nFollowing the stack trace: from logs:\r\n\r\n```\r\nStarted POST \"/redmine/projects/sottoprogetto_001-test/issues\" for 127.0.0.1 at 2016-06-28 08:39:33 +0200\r\nProcessing by IssuesController#create as HTML\r\n  Parameters: {\"utf8\"=>\"✓\", \"authenticity_token\"=>\"1eycUaR01eXUsH9IzUCUYxoQUO1UdprdFa5tS0qpO/IGylaijr0SHJaBJALRDtag7G+NOVKF3mPKF1fZZnC9xA==\", \"form_update_triggered_by\"=>\"\", \"issue\"=>{\"is_private\"=>\"0\", \"tracker_id\"=>\"9\", \"subject\"=>\"AAA\", \"description\"=>\"AAA\", \"status_id\"=>\"7\", \"priority_id\"=>\"10\", \"assigned_to_id\"=>\"\", \"parent_issue_id\"=>\"\", \"start_date\"=>\"2016-06-28\", \"custom_field_values\"=>{\"6\"=>\"2016-06-03\", \"20\"=>\"\", \"21\"=>\"\", \"48\"=>[\"XXX\", \"\"], \"4\"=>\"0\", \"5\"=>\"\", \"9\"=>\"\", \"25\"=>\"\", \"26\"=>\"\", \"27\"=>\"\", \"29\"=>\"\", \"33\"=>\"\", \"34\"=>\"\", \"35\"=>\"\", \"55\"=>\"\", \"37\"=>\"\", \"49\"=>\"\", \"44\"=>\"\", \"47\"=>\"\", \"42\"=>\"\", \"50\"=>\"Atteso\", \"51\"=>\"\", \"52\"=>\"\", \"45\"=>\"0\", \"46\"=>\"0\"}}, \"was_default_status\"=>\"7\", \"commit\"=>\"Crea\", \"project_id\"=>\"sottoprogetto_001-test\"}\r\n  Current user: admin (id=1)\r\n= Running shared code for Issue (#) \"Delivery #: AAA\"\r\n= Finished running shared code for Issue (#) \"Delivery #: AAA\"\r\nCompleted 500 Internal Server Error in 2621ms (ActiveRecord: 99.8ms)\r\n\r\nActiveRecord::StatementInvalid (TinyTds::Error: An expression of non-boolean type specified in a context where a condition is expected, near 'OR'.: EXEC sp_executesql N'SELECT COUNT(*) FROM [custom_workflows] WHERE [custom_workflows].[active] = @0 AND [custom_workflows].[observable] = @1 AND (is_for_all OR EXISTS (SELECT * FROM custom_workflows_projects WHERE project_id=16 AND custom_workflow_id=id))', N'@0 bit, @1 nvarchar(255)', @0 = 1, @1 = 'issue'):\r\n  plugins/redmine_custom_workflows/app/models/custom_workflow.rb:73:in `run_custom_workflows'\r\n  plugins/redmine_custom_workflows/lib/redmine_custom_workflows/issue_patch.rb:47:in `before_save_custom_workflows'\r\n  app/models/issue.rb:182:in `create_or_update'\r\n  app/controllers/issues_controller.rb:141:in `create'\r\n  lib/redmine/sudo_mode.rb:63:in `sudo_mode'\r\n\r\n```\r\n\r\nAny idea?\r\nThank you."},"comment":{"url":"https://api.github.com/repos/anteo/redmine_custom_workflows/issues/comments/235812727","html_url":"https://github.com/anteo/redmine_custom_workflows/issues/63#issuecomment-235812727","issue_url":"https://api.github.com/repos/anteo/redmine_custom_workflows/issues/63","id":235812727,"user":{"login":"andreav","id":1358304,"avatar_url":"https://avatars.githubusercontent.com/u/1358304?v=3","gravatar_id":"","url":"https://api.github.com/users/andreav","html_url":"https://github.com/andreav","followers_url":"https://api.github.com/users/andreav/followers","following_url":"https://api.github.com/users/andreav/following{/other_user}","gists_url":"https://api.github.com/users/andreav/gists{/gist_id}","starred_url":"https://api.github.com/users/andreav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreav/subscriptions","organizations_url":"https://api.github.com/users/andreav/orgs","repos_url":"https://api.github.com/users/andreav/repos","events_url":"https://api.github.com/users/andreav/events{/privacy}","received_events_url":"https://api.github.com/users/andreav/received_events","type":"User","site_admin":false},"created_at":"2016-07-28T06:44:46Z","updated_at":"2016-07-28T06:44:46Z","body":"Hi,\r\nI'm on:\r\nOS: Windows Server 2012\r\nDatabase: SQLServer 11.0.2100\r\n\r\nand inside database.yml i have:\r\n\r\nproduction:\r\n  adapter: sqlserver\r\n  database: REDMINE\r\n  username: xx\r\n  password: yy\r\n  dataserver: SRVWEB02\r\n  timeout: 200000\r\n\r\n"}}
{"actor":{"display_login":"andreav"}}