{"action":"opened","issue":{"url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/31","repository_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field","labels_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/31/comments","events_url":"https://api.github.com/repos/annikoff/redmine_plugin_computed_custom_field/issues/31/events","html_url":"https://github.com/annikoff/redmine_plugin_computed_custom_field/issues/31","id":150361993,"number":31,"title":"Как понять, изменилось ли кастомное поле с мультивыбором?","user":{"login":"msneet","id":16936262,"avatar_url":"https://avatars.githubusercontent.com/u/16936262?v=3","gravatar_id":"","url":"https://api.github.com/users/msneet","html_url":"https://github.com/msneet","followers_url":"https://api.github.com/users/msneet/followers","following_url":"https://api.github.com/users/msneet/following{/other_user}","gists_url":"https://api.github.com/users/msneet/gists{/gist_id}","starred_url":"https://api.github.com/users/msneet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msneet/subscriptions","organizations_url":"https://api.github.com/users/msneet/orgs","repos_url":"https://api.github.com/users/msneet/repos","events_url":"https://api.github.com/users/msneet/events{/privacy}","received_events_url":"https://api.github.com/users/msneet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-22T12:53:21Z","updated_at":"2016-04-22T12:53:21Z","closed_at":null,"body":"Пытаюсь определить изменилось ли кастомное поле, допускающее мультивыбор. Допустимых значений сотни, поэтому все возможные сочетания значений невозможно перебрать. Следующее сравнение всегда верно, независимо, были ли изменения:\r\n```\r\n  if custom_field_value(218) != custom_value_for(218).try(:value)\r\n    #errors.add '', 'изменилась продажа'\r\n    #...\r\n  end \r\n```\r\nДанный код использую в обработчике before_save плагина custom workflow, но это большого значения вроде как не имеет, т.к. код работает один и тот же.\r\nКак грамотно понять, было ли изменение ?"}}