{"action":"created","issue":{"url":"https://api.github.com/repos/sul-dlss/sul_pub/issues/68","repository_url":"https://api.github.com/repos/sul-dlss/sul_pub","labels_url":"https://api.github.com/repos/sul-dlss/sul_pub/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/sul-dlss/sul_pub/issues/68/comments","events_url":"https://api.github.com/repos/sul-dlss/sul_pub/issues/68/events","html_url":"https://github.com/sul-dlss/sul_pub/issues/68","id":158792665,"number":68,"title":"Remediate production data which have visibility=nil","user":{"login":"mejackreed","id":1656824,"avatar_url":"https://avatars.githubusercontent.com/u/1656824?v=3","gravatar_id":"","url":"https://api.github.com/users/mejackreed","html_url":"https://github.com/mejackreed","followers_url":"https://api.github.com/users/mejackreed/followers","following_url":"https://api.github.com/users/mejackreed/following{/other_user}","gists_url":"https://api.github.com/users/mejackreed/gists{/gist_id}","starred_url":"https://api.github.com/users/mejackreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mejackreed/subscriptions","organizations_url":"https://api.github.com/users/mejackreed/orgs","repos_url":"https://api.github.com/users/mejackreed/repos","events_url":"https://api.github.com/users/mejackreed/events{/privacy}","received_events_url":"https://api.github.com/users/mejackreed/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sul-dlss/sul_pub/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"drh-stanford","id":1861171,"avatar_url":"https://avatars.githubusercontent.com/u/1861171?v=3","gravatar_id":"","url":"https://api.github.com/users/drh-stanford","html_url":"https://github.com/drh-stanford","followers_url":"https://api.github.com/users/drh-stanford/followers","following_url":"https://api.github.com/users/drh-stanford/following{/other_user}","gists_url":"https://api.github.com/users/drh-stanford/gists{/gist_id}","starred_url":"https://api.github.com/users/drh-stanford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drh-stanford/subscriptions","organizations_url":"https://api.github.com/users/drh-stanford/orgs","repos_url":"https://api.github.com/users/drh-stanford/repos","events_url":"https://api.github.com/users/drh-stanford/events{/privacy}","received_events_url":"https://api.github.com/users/drh-stanford/received_events","type":"User","site_admin":false},"milestone":null,"comments":15,"created_at":"2016-06-06T22:45:32Z","updated_at":"2016-06-06T22:45:36Z","closed_at":null,"body":"_From @drh-stanford on June 1, 2016 21:10_\n\nOur production data incorrectly have some records that have `visibility=nil`. We need to remediate them by running `rake cap:poll[N]` with a large N\r\n\r\nExample record from `author.publications.map {|p| p.pub_hash[:authorship]}`:\r\n\r\n```\r\n  {:cap_profile_id=>5863, :sul_author_id=>947, :status=>\"approved\", :visibility=>nil, :featured=>false}],\r\n```\r\n\r\nNote that the problem in pervasive:\r\n\r\n```\r\nContribution.order('created_at asc').where(:visibility=>nil).limit(1)..select(:created_at)\r\n=> [#<Contribution:0x00000008ba5e48 id: nil, created_at: Tue, 18 Jun 2013 13:42:50 UTC +00:00>]```\r\n```\r\n\r\nso there is a contribution created in 2013 that has visibility set to nil\n\n_Copied from original issue: sul-dlss/sul-pub#500_"},"comment":{"url":"https://api.github.com/repos/sul-dlss/sul_pub/issues/comments/224111860","html_url":"https://github.com/sul-dlss/sul_pub/issues/68#issuecomment-224111860","issue_url":"https://api.github.com/repos/sul-dlss/sul_pub/issues/68","id":224111860,"user":{"login":"mejackreed","id":1656824,"avatar_url":"https://avatars.githubusercontent.com/u/1656824?v=3","gravatar_id":"","url":"https://api.github.com/users/mejackreed","html_url":"https://github.com/mejackreed","followers_url":"https://api.github.com/users/mejackreed/followers","following_url":"https://api.github.com/users/mejackreed/following{/other_user}","gists_url":"https://api.github.com/users/mejackreed/gists{/gist_id}","starred_url":"https://api.github.com/users/mejackreed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mejackreed/subscriptions","organizations_url":"https://api.github.com/users/mejackreed/orgs","repos_url":"https://api.github.com/users/mejackreed/repos","events_url":"https://api.github.com/users/mejackreed/events{/privacy}","received_events_url":"https://api.github.com/users/mejackreed/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T22:45:36Z","updated_at":"2016-06-06T22:45:36Z","body":"_From @drh-stanford on June 6, 2016 18:56_\n\nHere is the latest counts for the `visibility.nil?` issue now that `cap:poll` is finished running\r\n\r\n```\r\nPRODUCTION [40] pry(main)> Contribution.where(visibility: nil).count\r\n=> 2163\r\nPRODUCTION [41] pry(main)> Contribution.where(visibility: %w(public private)).count\r\n=> 706159\r\nPRODUCTION [42] pry(main)> Contribution.count\r\n=> 708322\r\n```"}}
{"actor":{"display_login":"mejackreed"}}