{"action":"closed","number":162,"pull_request":{"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/162","id":54552985,"html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/162","diff_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/162.diff","patch_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/162.patch","issue_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/162","number":162,"state":"closed","locked":false,"title":"Let admins download a list of users (and information about their applications) from the admin portal","user":{"login":"pcraig3","id":2454380,"avatar_url":"https://avatars.githubusercontent.com/u/2454380?v=3","gravatar_id":"","url":"https://api.github.com/users/pcraig3","html_url":"https://github.com/pcraig3","followers_url":"https://api.github.com/users/pcraig3/followers","following_url":"https://api.github.com/users/pcraig3/following{/other_user}","gists_url":"https://api.github.com/users/pcraig3/gists{/gist_id}","starred_url":"https://api.github.com/users/pcraig3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcraig3/subscriptions","organizations_url":"https://api.github.com/users/pcraig3/orgs","repos_url":"https://api.github.com/users/pcraig3/repos","events_url":"https://api.github.com/users/pcraig3/events{/privacy}","received_events_url":"https://api.github.com/users/pcraig3/received_events","type":"User","site_admin":false},"body":"This pull request hooks into the [API method that returns a list of users](https://github.com/alphagov/digitalmarketplace-api/pull/312) and their status in relation to a given framework.  This way Digital Marketplace admins can generate lists of users on the fly and send emails to those who should get them (for example, when clarification questions are uploaded).\r\n\r\nIf no users exist for a given framework, a CSV containing only a header file is returned.\r\nIf no frameworks with a valid status exist (*highly* unlikely), then nothing can be downloaded.\r\n\r\n#### Notes\r\n\r\n- I've only given it to the admin role.  Do we want other roles to be able to access it?\r\n- Is there a better way to export CSVs?  I've just done what I saw on [StackOverflow](http://stackoverflow.com/questions/32608265/streaming-a-generated-csv-with-flask). ([CSV Lint](http://csvlint.io/) likes it, for what it's worth.)\r\n\r\n***\r\n\r\n### Admin portal link\r\n\r\n![screen shot 2015-12-24 at 10 44 30](https://cloud.githubusercontent.com/assets/2454380/11995364/68ef12bc-aa47-11e5-9555-037a4a2af16e.png)\r\n\r\n### Export user list\r\n![screen shot 2015-12-24 at 10 45 06](https://cloud.githubusercontent.com/assets/2454380/11995378/9df0dc48-aa47-11e5-9a5a-89533f866a51.png)\r\n\r\n### No framework selected\r\n![screen shot 2015-12-24 at 10 45 17](https://cloud.githubusercontent.com/assets/2454380/11995377/9b14f54a-aa47-11e5-9568-73ae22495837.png)\r\n\r\n### No frameworks are valid\r\n![screen shot 2015-12-24 at 10 46 33](https://cloud.githubusercontent.com/assets/2454380/11995371/80aea656-aa47-11e5-86fd-3c93ddbff6cf.png)","created_at":"2015-12-24T14:08:15Z","updated_at":"2016-01-06T14:40:49Z","closed_at":"2016-01-06T14:40:49Z","merged_at":null,"merge_commit_sha":"1f05cbe196675b0feda182234c76bd642bd43faf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/162/commits","review_comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/162/comments","review_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/162/comments","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/9cf9ec22b696587f38aa2617e936d0d858fcd657","head":{"label":"alphagov:pc_universal_users_utility","ref":"pc_universal_users_utility","sha":"9cf9ec22b696587f38aa2617e936d0d858fcd657","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31009853,"name":"digitalmarketplace-admin-frontend","full_name":"alphagov/digitalmarketplace-admin-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","description":"Frontend administration application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/releases{/id}","created_at":"2015-02-19T10:09:45Z","updated_at":"2015-10-28T11:13:51Z","pushed_at":"2016-01-06T13:55:01Z","git_url":"git://github.com/alphagov/digitalmarketplace-admin-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-admin-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","homepage":"","size":705,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"7f1c624438ffd06664586acb6cfa6bc18d2a2d1f","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":31009853,"name":"digitalmarketplace-admin-frontend","full_name":"alphagov/digitalmarketplace-admin-frontend","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","description":"Frontend administration application for the digital marketplace","fork":false,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend","forks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/forks","keys_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/teams","hooks_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/hooks","issue_events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/events","assignees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/tags","blobs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/languages","stargazers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/stargazers","contributors_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contributors","subscribers_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscribers","subscription_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/subscription","commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/merges","archive_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/downloads","issues_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/releases{/id}","created_at":"2015-02-19T10:09:45Z","updated_at":"2015-10-28T11:13:51Z","pushed_at":"2016-01-06T13:55:01Z","git_url":"git://github.com/alphagov/digitalmarketplace-admin-frontend.git","ssh_url":"git@github.com:alphagov/digitalmarketplace-admin-frontend.git","clone_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend.git","svn_url":"https://github.com/alphagov/digitalmarketplace-admin-frontend","homepage":"","size":705,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/162"},"html":{"href":"https://github.com/alphagov/digitalmarketplace-admin-frontend/pull/162"},"issue":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/162"},"comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/issues/162/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/162/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/pulls/162/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/digitalmarketplace-admin-frontend/statuses/9cf9ec22b696587f38aa2617e936d0d858fcd657"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":11,"additions":329,"deletions":9,"changed_files":8}}