Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System data request for all public bodies with no email addresses #1084

Closed
sallytay opened this issue Mar 22, 2022 · 3 comments
Closed

System data request for all public bodies with no email addresses #1084

sallytay opened this issue Mar 22, 2022 · 3 comments

Comments

@sallytay
Copy link
Contributor

Would it be possible to get a list of all public bodies that currently have no email address.

Helen has offered to have a look through these for us, and it's something that we could use in the future for giving new volunteers projects to work on

It would be useful for it to include the public body name and a link to their admin page.

@RichardTaylor
Copy link

This could be achieved via a new field on the CSV download.

A request_address_held field could show TRUE if one is held and FALSE if not.

@garethrees
Copy link
Member

Generated an export today with the following:

csv_string = CSV.generate do |csv|
  csv << %w[
    public_url
    admin_url
    body_name
    home_page
    tags
  ]

  PublicBody.without_request_email.each do |body|
    csv << [
      "https://www.whatdotheyknow.com/body/#{body.url_name}",
      "https://www.whatdotheyknow.com/admin/bodies/#{body.id}",
      body.name,
      body.calculated_home_page,
      body.tag_string
    ]
  end

  csv
end

File.write("tmp/#{Date.today.iso8601}-missing-body-emails.csv", csv_string)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants