{"action":"created","issue":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1800","repository_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1800/labels{/name}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1800/comments","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1800/events","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1800","id":182753706,"number":1800,"title":"Fix EZP-26397: Force isSearchable::false on FieldDefinitions of a type that isn't searchable","user":{"login":"bdunogier","id":235928,"avatar_url":"https://avatars.githubusercontent.com/u/235928?v=3","gravatar_id":"","url":"https://api.github.com/users/bdunogier","html_url":"https://github.com/bdunogier","followers_url":"https://api.github.com/users/bdunogier/followers","following_url":"https://api.github.com/users/bdunogier/following{/other_user}","gists_url":"https://api.github.com/users/bdunogier/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunogier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunogier/subscriptions","organizations_url":"https://api.github.com/users/bdunogier/orgs","repos_url":"https://api.github.com/users/bdunogier/repos","events_url":"https://api.github.com/users/bdunogier/events{/privacy}","received_events_url":"https://api.github.com/users/bdunogier/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-10-13T10:34:19Z","updated_at":"2016-10-13T12:47:51Z","closed_at":"2016-10-13T12:10:01Z","pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1800","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1800","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1800.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1800.patch"},"body":"> Fixes https://jira.ez.no/browse/EZP-26397\r\n\r\nIf a field definition is marked as searchable in the database, it will be marked as such in ContentType drafts. This will make the ContentType impossible to edit unless you force that value off.\r\n\r\nThis adds a check during mapping that forces the value to `false` if the FieldType isn't searchable, thus preventing any error. In addition, it will transparently fix any wrong value upon save.\r\n\r\nFixing this in repository-forms instead would be much more complicated. \r\n\r\n### TODO\r\n- [x] Make the mapper force `isSearchable` to `false` when the FieldType isn't searchabe\r\n- [x] Mark {{user.user_account}} as not searchable in `cleandata.sql`\r\n- [ ] Add dbupdate script (do we have dbupdates for minor versions ?) \r\n"},"comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments/253503106","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1800#issuecomment-253503106","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1800","id":253503106,"user":{"login":"clash82","id":3033038,"avatar_url":"https://avatars.githubusercontent.com/u/3033038?v=3","gravatar_id":"","url":"https://api.github.com/users/clash82","html_url":"https://github.com/clash82","followers_url":"https://api.github.com/users/clash82/followers","following_url":"https://api.github.com/users/clash82/following{/other_user}","gists_url":"https://api.github.com/users/clash82/gists{/gist_id}","starred_url":"https://api.github.com/users/clash82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clash82/subscriptions","organizations_url":"https://api.github.com/users/clash82/orgs","repos_url":"https://api.github.com/users/clash82/repos","events_url":"https://api.github.com/users/clash82/events{/privacy}","received_events_url":"https://api.github.com/users/clash82/received_events","type":"User","site_admin":false},"created_at":"2016-10-13T12:47:50Z","updated_at":"2016-10-13T12:47:50Z","body":"> Do you know if this needs further changes in demo / studio data?\r\n\r\n@andrerom yes, we have to change it in demos:\r\n\r\nezplatform-demo: https://github.com/ezsystems/ezplatform-demo/blob/master/src/AppBundle/Resources/installer/sql/app_data.sql#L320\r\n\r\nezstudio-demo: https://github.com/ezsystems/ezstudio-demo-bundle/blob/master/Resources/installer/sql/demo_data.sql#L70"}}
{"actor":{"display_login":"clash82"}}