{"action":"closed","issue":{"url":"https://api.github.com/repos/oar-team/oar/issues/53","labels_url":"https://api.github.com/repos/oar-team/oar/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/oar-team/oar/issues/53/comments","events_url":"https://api.github.com/repos/oar-team/oar/issues/53/events","html_url":"https://github.com/oar-team/oar/issues/53","id":95637199,"number":53,"title":"Oaradmissionrules - Activate new rule fail with DBD::mysql::db do failed: You have an error in your SQL syntax;","user":{"login":"clement-parisot","id":6361556,"avatar_url":"https://avatars.githubusercontent.com/u/6361556?v=3","gravatar_id":"","url":"https://api.github.com/users/clement-parisot","html_url":"https://github.com/clement-parisot","followers_url":"https://api.github.com/users/clement-parisot/followers","following_url":"https://api.github.com/users/clement-parisot/following{/other_user}","gists_url":"https://api.github.com/users/clement-parisot/gists{/gist_id}","starred_url":"https://api.github.com/users/clement-parisot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clement-parisot/subscriptions","organizations_url":"https://api.github.com/users/clement-parisot/orgs","repos_url":"https://api.github.com/users/clement-parisot/repos","events_url":"https://api.github.com/users/clement-parisot/events{/privacy}","received_events_url":"https://api.github.com/users/clement-parisot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/oar-team/oar/labels/2.5","name":"2.5","color":"fef2c0"},{"url":"https://api.github.com/repos/oar-team/oar/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/oar-team/oar/labels/g5k","name":"g5k","color":"c7def8"},{"url":"https://api.github.com/repos/oar-team/oar/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":{"login":"bzizou","id":2647566,"avatar_url":"https://avatars.githubusercontent.com/u/2647566?v=3","gravatar_id":"","url":"https://api.github.com/users/bzizou","html_url":"https://github.com/bzizou","followers_url":"https://api.github.com/users/bzizou/followers","following_url":"https://api.github.com/users/bzizou/following{/other_user}","gists_url":"https://api.github.com/users/bzizou/gists{/gist_id}","starred_url":"https://api.github.com/users/bzizou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bzizou/subscriptions","organizations_url":"https://api.github.com/users/bzizou/orgs","repos_url":"https://api.github.com/users/bzizou/repos","events_url":"https://api.github.com/users/bzizou/events{/privacy}","received_events_url":"https://api.github.com/users/bzizou/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/oar-team/oar/milestones/2","html_url":"https://github.com/oar-team/oar/milestones/2.5.5","labels_url":"https://api.github.com/repos/oar-team/oar/milestones/2/labels","id":898851,"number":2,"title":"2.5.5","description":null,"creator":{"login":"npf","id":424014,"avatar_url":"https://avatars.githubusercontent.com/u/424014?v=3","gravatar_id":"","url":"https://api.github.com/users/npf","html_url":"https://github.com/npf","followers_url":"https://api.github.com/users/npf/followers","following_url":"https://api.github.com/users/npf/following{/other_user}","gists_url":"https://api.github.com/users/npf/gists{/gist_id}","starred_url":"https://api.github.com/users/npf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npf/subscriptions","organizations_url":"https://api.github.com/users/npf/orgs","repos_url":"https://api.github.com/users/npf/repos","events_url":"https://api.github.com/users/npf/events{/privacy}","received_events_url":"https://api.github.com/users/npf/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":14,"state":"open","created_at":"2014-12-10T13:47:59Z","updated_at":"2015-07-29T14:21:32Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2015-07-17T11:09:45Z","updated_at":"2015-07-29T14:21:32Z","closed_at":"2015-07-29T14:21:32Z","body":"Hello,\r\nI tried to add a new admission rule in OAR 2.5.4 using mysql database.\r\nThe command I used is : \r\n\r\n    oaradmissionrules -n\r\n\r\nI typed:\r\n\r\n    if ($queue_name ne \"production\"){\r\n     if ($jobproperties ne \"\"){\r\n      $jobproperties = \"($jobproperties) AND production = 'NO'\";\r\n     }else{\r\n      $jobproperties = \"production = 'NO'\";\r\n     }\r\n    }else{\r\n     if ($jobproperties ne \"\"){\r\n      $jobproperties = \"($jobproperties) AND production = 'YES'\";\r\n     }else{\r\n      $jobproperties = \"production = 'YES'\";\r\n     }\r\n    }\r\n\r\nBut command failed with this error:\r\n\r\n    DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(priority, enabled, rule) = (0, 'YES', 'if ($queue_name ne \\\"production\\\"){\\n if' at line 2 at /usr/share/perl5/OAR/IO.pm line 4785.\r\n\r\nI tried to change the rule and add some escaped characters (like \\' or \\\") but there is allways the same error. I tried to import it from a file but it didn't change anything.\r\n\r\nIs there a bug in OAR or syntax of the new rule is incorrect ?\r\nBest regards,\r\nClement"}}