{"action":"created","comment":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/139870092","pull_request_review_id":63860722,"id":139870092,"diff_hunk":"@@ -417,8 +417,6 @@ def travel_to(time)\n           [:address1, :address2, :city, :zipcode, :state_id, :country_id].each do |attr|\n             expect(invoice_order.billing_address[attr]).to eq july_billable_period2.enterprise.address[attr]\n           end\n-          expect(invoice_order.billing_address.firstname).to eq \"Anna\"","path":"spec/jobs/update_account_invoices_spec.rb","position":31,"original_position":4,"commit_id":"babea7e7c909257aedd40e241b31c3e01aa63326","original_commit_id":"ba3639f8e6667197623a040c5503037b06210dc5","user":{"login":"mkllnk","id":3524483,"avatar_url":"https://avatars0.githubusercontent.com/u/3524483?v=4","gravatar_id":"","url":"https://api.github.com/users/mkllnk","html_url":"https://github.com/mkllnk","followers_url":"https://api.github.com/users/mkllnk/followers","following_url":"https://api.github.com/users/mkllnk/following{/other_user}","gists_url":"https://api.github.com/users/mkllnk/gists{/gist_id}","starred_url":"https://api.github.com/users/mkllnk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkllnk/subscriptions","organizations_url":"https://api.github.com/users/mkllnk/orgs","repos_url":"https://api.github.com/users/mkllnk/repos","events_url":"https://api.github.com/users/mkllnk/events{/privacy}","received_events_url":"https://api.github.com/users/mkllnk/received_events","type":"User","site_admin":false},"body":"Why has this been removed?","created_at":"2017-09-20T03:52:05Z","updated_at":"2017-09-20T03:56:22Z","html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1720#discussion_r139870092","pull_request_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments/139870092"},"html":{"href":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1720#discussion_r139870092"},"pull_request":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720"}}},"pull_request":{"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720","id":132331090,"html_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1720","diff_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1720.diff","patch_url":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1720.patch","issue_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1720","number":1720,"state":"open","locked":false,"title":"Email/change enterprise confirmations","user":{"login":"Matt-Yorkley","id":9029026,"avatar_url":"https://avatars0.githubusercontent.com/u/9029026?v=4","gravatar_id":"","url":"https://api.github.com/users/Matt-Yorkley","html_url":"https://github.com/Matt-Yorkley","followers_url":"https://api.github.com/users/Matt-Yorkley/followers","following_url":"https://api.github.com/users/Matt-Yorkley/following{/other_user}","gists_url":"https://api.github.com/users/Matt-Yorkley/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt-Yorkley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt-Yorkley/subscriptions","organizations_url":"https://api.github.com/users/Matt-Yorkley/orgs","repos_url":"https://api.github.com/users/Matt-Yorkley/repos","events_url":"https://api.github.com/users/Matt-Yorkley/events{/privacy}","received_events_url":"https://api.github.com/users/Matt-Yorkley/received_events","type":"User","site_admin":false},"body":"Removing enterprise confirmations for #946. I think there isn't a specific issue for this, but it's mentioned somewhere in a list of \"issues that need to be created\".\r\n\r\nShouldn't be merged before #1768 is finished and merged.\r\n\r\nNote: The implementation for how the user is set to receive emails was changed slightly from the original spec, but the end result is more or less the same. See discussions below about the `receives_notifications` flag.\r\n\r\n**Testing**\r\n\r\nThis PR removes the need to confirm enterprises by email, but also includes changes to the way the user that receives emails for an enterprise is set, as this was previously done via the confirmable `Enterprise.email` field. \r\n\r\nNow the \"notification\" field (for the user that will receive emails) is a dropdown list of the enterprises' current managers, which sets a flag on that manager. Only managers with confirmed emails can be selected to receive emails. I made some adjustments to the UI to make this more clear, and to show which managers have confirmed their emails.\r\n\r\n![screenshot from 2017-07-27 13-12-29](https://user-images.githubusercontent.com/9029026/29971404-01ba2a54-8f20-11e7-97cb-0584544a261b.png)\r\n\r\nThe way managers are added to an enterprise is unchanged. A separate PR will add functionality for inviting an unregistered user to be a manager from within the managers UI.\r\n\r\nI also adjusted the managers UI so that the current owner and/or current user that receives emails cannot be deleted from the list of managers, as this can cause all kinds of problems and could previously be done by mistake if the user wasn't careful. The delete button next to the owner or contact user is greyed out and disabled. They become delete-able again once a different user is selected for these roles. I readjusted the UI to show which users are the owner/contact. \r\n\r\n![screenshot from 2017-07-28 17-13-17](https://user-images.githubusercontent.com/9029026/29971405-01baeec6-8f20-11e7-8e85-f3b82d3fe24c.png)\r\n","created_at":"2017-07-25T16:58:14Z","updated_at":"2017-09-20T03:56:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60968af599e15e2281e40ba261dbf7900076017a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720/commits","review_comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720/comments","review_comment_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1720/comments","statuses_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/babea7e7c909257aedd40e241b31c3e01aa63326","head":{"label":"Matt-Yorkley:email/change_enterprise_confirmations","ref":"email/change_enterprise_confirmations","sha":"babea7e7c909257aedd40e241b31c3e01aa63326","user":{"login":"Matt-Yorkley","id":9029026,"avatar_url":"https://avatars0.githubusercontent.com/u/9029026?v=4","gravatar_id":"","url":"https://api.github.com/users/Matt-Yorkley","html_url":"https://github.com/Matt-Yorkley","followers_url":"https://api.github.com/users/Matt-Yorkley/followers","following_url":"https://api.github.com/users/Matt-Yorkley/following{/other_user}","gists_url":"https://api.github.com/users/Matt-Yorkley/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt-Yorkley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt-Yorkley/subscriptions","organizations_url":"https://api.github.com/users/Matt-Yorkley/orgs","repos_url":"https://api.github.com/users/Matt-Yorkley/repos","events_url":"https://api.github.com/users/Matt-Yorkley/events{/privacy}","received_events_url":"https://api.github.com/users/Matt-Yorkley/received_events","type":"User","site_admin":false},"repo":{"id":24829011,"name":"openfoodnetwork","full_name":"Matt-Yorkley/openfoodnetwork","owner":{"login":"Matt-Yorkley","id":9029026,"avatar_url":"https://avatars0.githubusercontent.com/u/9029026?v=4","gravatar_id":"","url":"https://api.github.com/users/Matt-Yorkley","html_url":"https://github.com/Matt-Yorkley","followers_url":"https://api.github.com/users/Matt-Yorkley/followers","following_url":"https://api.github.com/users/Matt-Yorkley/following{/other_user}","gists_url":"https://api.github.com/users/Matt-Yorkley/gists{/gist_id}","starred_url":"https://api.github.com/users/Matt-Yorkley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Matt-Yorkley/subscriptions","organizations_url":"https://api.github.com/users/Matt-Yorkley/orgs","repos_url":"https://api.github.com/users/Matt-Yorkley/repos","events_url":"https://api.github.com/users/Matt-Yorkley/events{/privacy}","received_events_url":"https://api.github.com/users/Matt-Yorkley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Matt-Yorkley/openfoodnetwork","description":"Connect suppliers, distributors and consumers for the sale and purchase of local produce","fork":true,"url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork","forks_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/forks","keys_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/teams","hooks_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/hooks","issue_events_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/events","assignees_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/tags","blobs_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/languages","stargazers_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/stargazers","contributors_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/contributors","subscribers_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/subscribers","subscription_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/subscription","commits_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/merges","archive_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/downloads","issues_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/labels{/name}","releases_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/releases{/id}","deployments_url":"https://api.github.com/repos/Matt-Yorkley/openfoodnetwork/deployments","created_at":"2014-10-05T23:46:02Z","updated_at":"2016-11-16T12:29:59Z","pushed_at":"2017-09-18T17:17:01Z","git_url":"git://github.com/Matt-Yorkley/openfoodnetwork.git","ssh_url":"git@github.com:Matt-Yorkley/openfoodnetwork.git","clone_url":"https://github.com/Matt-Yorkley/openfoodnetwork.git","svn_url":"https://github.com/Matt-Yorkley/openfoodnetwork","homepage":null,"size":35193,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"openfoodfoundation:master","ref":"master","sha":"72d264fab9301435ac4ed9b3efa0d09fd96451f0","user":{"login":"openfoodfoundation","id":2578987,"avatar_url":"https://avatars0.githubusercontent.com/u/2578987?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfoundation","html_url":"https://github.com/openfoodfoundation","followers_url":"https://api.github.com/users/openfoodfoundation/followers","following_url":"https://api.github.com/users/openfoodfoundation/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfoundation/subscriptions","organizations_url":"https://api.github.com/users/openfoodfoundation/orgs","repos_url":"https://api.github.com/users/openfoodfoundation/repos","events_url":"https://api.github.com/users/openfoodfoundation/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfoundation/received_events","type":"Organization","site_admin":false},"repo":{"id":6257856,"name":"openfoodnetwork","full_name":"openfoodfoundation/openfoodnetwork","owner":{"login":"openfoodfoundation","id":2578987,"avatar_url":"https://avatars0.githubusercontent.com/u/2578987?v=4","gravatar_id":"","url":"https://api.github.com/users/openfoodfoundation","html_url":"https://github.com/openfoodfoundation","followers_url":"https://api.github.com/users/openfoodfoundation/followers","following_url":"https://api.github.com/users/openfoodfoundation/following{/other_user}","gists_url":"https://api.github.com/users/openfoodfoundation/gists{/gist_id}","starred_url":"https://api.github.com/users/openfoodfoundation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openfoodfoundation/subscriptions","organizations_url":"https://api.github.com/users/openfoodfoundation/orgs","repos_url":"https://api.github.com/users/openfoodfoundation/repos","events_url":"https://api.github.com/users/openfoodfoundation/events{/privacy}","received_events_url":"https://api.github.com/users/openfoodfoundation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openfoodfoundation/openfoodnetwork","description":"Connect suppliers, distributors and consumers for the sale and purchase of local produce","fork":false,"url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork","forks_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/forks","keys_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/teams","hooks_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/hooks","issue_events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/events{/number}","events_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/events","assignees_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/assignees{/user}","branches_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/branches{/branch}","tags_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/tags","blobs_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/refs{/sha}","trees_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/{sha}","languages_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/languages","stargazers_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/stargazers","contributors_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/contributors","subscribers_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/subscribers","subscription_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/subscription","commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/commits{/sha}","git_commits_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/git/commits{/sha}","comments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/comments{/number}","issue_comment_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/comments{/number}","contents_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/contents/{+path}","compare_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/merges","archive_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/downloads","issues_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues{/number}","pulls_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls{/number}","milestones_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/milestones{/number}","notifications_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/labels{/name}","releases_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/releases{/id}","deployments_url":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/deployments","created_at":"2012-10-17T07:56:23Z","updated_at":"2017-09-18T15:24:53Z","pushed_at":"2017-09-20T03:23:37Z","git_url":"git://github.com/openfoodfoundation/openfoodnetwork.git","ssh_url":"git@github.com:openfoodfoundation/openfoodnetwork.git","clone_url":"https://github.com/openfoodfoundation/openfoodnetwork.git","svn_url":"https://github.com/openfoodfoundation/openfoodnetwork","homepage":"http://openfoodnetwork.org/","size":35248,"stargazers_count":214,"watchers_count":214,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":129,"mirror_url":null,"open_issues_count":644,"forks":129,"open_issues":644,"watchers":214,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720"},"html":{"href":"https://github.com/openfoodfoundation/openfoodnetwork/pull/1720"},"issue":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1720"},"comments":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/issues/1720/comments"},"review_comments":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720/comments"},"review_comment":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/pulls/1720/commits"},"statuses":{"href":"https://api.github.com/repos/openfoodfoundation/openfoodnetwork/statuses/babea7e7c909257aedd40e241b31c3e01aa63326"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mkllnk"}}