{"action":"created","issue":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1605","repository_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel","labels_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1605/labels{/name}","comments_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1605/comments","events_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1605/events","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1605","id":138971817,"number":1605,"title":"[WIP] EZP-24648: New SPI interface for getName() handling","user":{"login":"andrerom","id":289757,"avatar_url":"https://avatars.githubusercontent.com/u/289757?v=3","gravatar_id":"","url":"https://api.github.com/users/andrerom","html_url":"https://github.com/andrerom","followers_url":"https://api.github.com/users/andrerom/followers","following_url":"https://api.github.com/users/andrerom/following{/other_user}","gists_url":"https://api.github.com/users/andrerom/gists{/gist_id}","starred_url":"https://api.github.com/users/andrerom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrerom/subscriptions","organizations_url":"https://api.github.com/users/andrerom/orgs","repos_url":"https://api.github.com/users/andrerom/repos","events_url":"https://api.github.com/users/andrerom/events{/privacy}","received_events_url":"https://api.github.com/users/andrerom/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-03-07T12:54:17Z","updated_at":"2016-03-10T15:37:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/pulls/1605","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1605","diff_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1605.diff","patch_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1605.patch"},"body":"https://jira.ez.no/browse/EZP-24648\r\n\r\n- [x] Proposal for Interface change\r\n- [x] Add missing deprecations to FieldType related interfaces to have a better overview of it all *(can be moved to separate PR later, just wanted to make sure we are all on the same page on what is relevant and not in here now)*\r\n- [ ] Implementation *(thinking tagged services for use in NameSchemaService)*\r\n- [ ] Soft BC break *(for backports?)*?: Like finding a way to have a default impl which takes FieldType `Type` as argument and calls the existing getName?\r\n\r\n\r\n### Design\r\n\r\nIn getName there is a design flaw in that it expects all relevant information to be on Field Values, however as the API is designed to avoid unexpected eager loading of objects, they sometimes don't. As is the case with Selection and Relation(s) field types.\r\n\r\nThe suggested approach here moves getName out to own service, like Indexable (SearchField), so it can almost freely depend on other services, and it also changes the design to make FieldDefition available in cases the human readable value is stored on the definition like in ezselection."},"comment":{"url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/comments/194907996","html_url":"https://github.com/ezsystems/ezpublish-kernel/pull/1605#issuecomment-194907996","issue_url":"https://api.github.com/repos/ezsystems/ezpublish-kernel/issues/1605","id":194907996,"user":{"login":"andrerom","id":289757,"avatar_url":"https://avatars.githubusercontent.com/u/289757?v=3","gravatar_id":"","url":"https://api.github.com/users/andrerom","html_url":"https://github.com/andrerom","followers_url":"https://api.github.com/users/andrerom/followers","following_url":"https://api.github.com/users/andrerom/following{/other_user}","gists_url":"https://api.github.com/users/andrerom/gists{/gist_id}","starred_url":"https://api.github.com/users/andrerom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrerom/subscriptions","organizations_url":"https://api.github.com/users/andrerom/orgs","repos_url":"https://api.github.com/users/andrerom/repos","events_url":"https://api.github.com/users/andrerom/events{/privacy}","received_events_url":"https://api.github.com/users/andrerom/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T15:37:12Z","updated_at":"2016-03-10T15:37:12Z","body":"> Overall looks good to me, default ValueStringNameable implementation including.\r\n\r\nOk, but be aware my summary above aims to use fallback to `FieldType->getName()` by default.\r\n\r\n@pspanja / @bdunogier  FYI: I was tempted to refactor NameSchemaService and ContentService to be able to inject Fields instead of just FieldValue, as it already contains languageCode on it. But this would be rather big change, and as the field might not be stored yet, things like field id/version should not be available to these services at all, which is why I'm not proposing that here."}}