{"action":"created","issue":{"url":"https://api.github.com/repos/samvera/hyrax/issues/3283","repository_url":"https://api.github.com/repos/samvera/hyrax","labels_url":"https://api.github.com/repos/samvera/hyrax/issues/3283/labels{/name}","comments_url":"https://api.github.com/repos/samvera/hyrax/issues/3283/comments","events_url":"https://api.github.com/repos/samvera/hyrax/issues/3283/events","html_url":"https://github.com/samvera/hyrax/pull/3283","id":361002345,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2MDgzNTg4","number":3283,"title":"Display collections without descriptions","user":{"login":"no-reply","id":1361776,"node_id":"MDQ6VXNlcjEzNjE3NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1361776?v=4","gravatar_id":"","url":"https://api.github.com/users/no-reply","html_url":"https://github.com/no-reply","followers_url":"https://api.github.com/users/no-reply/followers","following_url":"https://api.github.com/users/no-reply/following{/other_user}","gists_url":"https://api.github.com/users/no-reply/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply/subscriptions","organizations_url":"https://api.github.com/users/no-reply/orgs","repos_url":"https://api.github.com/users/no-reply/repos","events_url":"https://api.github.com/users/no-reply/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply/received_events","type":"User","site_admin":false},"labels":[{"id":503705298,"node_id":"MDU6TGFiZWw1MDM3MDUyOTg=","url":"https://api.github.com/repos/samvera/hyrax/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-17T19:07:31Z","updated_at":"2018-09-18T22:34:19Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/samvera/hyrax/pulls/3283","html_url":"https://github.com/samvera/hyrax/pull/3283","diff_url":"https://github.com/samvera/hyrax/pull/3283.diff","patch_url":"https://github.com/samvera/hyrax/pull/3283.patch"},"body":"`CollectionPresenter#description` is delegated to `#solr_document`, which can return `nil`. When we display the collection, we try to call `#each`, which gives `NoMethodError` in the `nil` case.\r\n\r\nUsing the safe access operator `&.` avoids this bug and allows display of Collections and AdminSets without any descriptions.\r\n\r\nConnected to #2575.\r\n\r\nGuidance for testing, such as acceptance criteria or new user interface behaviors:\r\n* Create a collection with no description;\r\n* Visit the collection show page and ensure there is no error.\r\n\r\n@samvera/hyrax-code-reviewers\r\n"},"comment":{"url":"https://api.github.com/repos/samvera/hyrax/issues/comments/422580436","html_url":"https://github.com/samvera/hyrax/pull/3283#issuecomment-422580436","issue_url":"https://api.github.com/repos/samvera/hyrax/issues/3283","id":422580436,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMjU4MDQzNg==","user":{"login":"no-reply","id":1361776,"node_id":"MDQ6VXNlcjEzNjE3NzY=","avatar_url":"https://avatars2.githubusercontent.com/u/1361776?v=4","gravatar_id":"","url":"https://api.github.com/users/no-reply","html_url":"https://github.com/no-reply","followers_url":"https://api.github.com/users/no-reply/followers","following_url":"https://api.github.com/users/no-reply/following{/other_user}","gists_url":"https://api.github.com/users/no-reply/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply/subscriptions","organizations_url":"https://api.github.com/users/no-reply/orgs","repos_url":"https://api.github.com/users/no-reply/repos","events_url":"https://api.github.com/users/no-reply/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply/received_events","type":"User","site_admin":false},"created_at":"2018-09-18T22:34:19Z","updated_at":"2018-09-18T22:34:19Z","author_association":"MEMBER","body":"@jcoyne:\r\n\r\n> Have you considered having the description return [] if it’s not present?\r\n\r\nThis would be a nice change, but isn't sufficient here for two reasons:\r\n\r\n  - In practice, applications provide their own implementations of `SolrDocument` via the generator; these normally return `[Array<Object>, nil]`. To fix this bug for existing applications, we need to be tolerant.\r\n  - Changing from returning `nil` in the empty case to `[]` would change the method signature for either this one accessor, or (probably better?) all field accessors on `SolrDocument`. It seems reasonable to expect that some users do `.nil?` checks which would be broken on the change.\r\n\r\nIn short, this feels like a larger `SolrDocument` reworking, and we need to continue to support current behavior until at least 3.0.0."}}
{"actor":{"display_login":"no-reply"}}