diff options
-rw-r--r-- | app/controllers/request_controller.rb | 6 | ||||
-rw-r--r-- | app/models/holiday.rb | 8 | ||||
-rw-r--r-- | app/models/info_request.rb | 7 | ||||
-rw-r--r-- | app/models/public_body.rb | 7 | ||||
-rw-r--r-- | app/views/help/about.rhtml | 54 | ||||
-rw-r--r-- | app/views/request/_followup.rhtml | 25 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 27 | ||||
-rw-r--r-- | app/views/request_mailer/overdue_alert.rhtml | 4 | ||||
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 2 | ||||
-rw-r--r-- | todo.txt | 29 |
10 files changed, 88 insertions, 81 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index c4fb9e030..9bf51483a 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: request_controller.rb,v 1.187 2009-10-01 12:01:26 francis Exp $ +# $Id: request_controller.rb,v 1.188 2009-10-02 22:56:34 francis Exp $ class RequestController < ApplicationController @@ -315,10 +315,10 @@ class RequestController < ApplicationController # Display advice for requester on what to do next, as appropriate if @info_request.calculate_status == 'waiting_response' - flash[:notice] = "<p>Thank you! Hopefully your wait isn't too long.</p> <p>By law, you should get a response before the end of <strong>" + simple_date(@info_request.date_response_required_by) + "</strong>.</p>" + flash[:notice] = "<p>Thank you! Hopefully your wait isn't too long.</p> <p>By law, you should get a response promptly, and normally before the end of <strong>" + simple_date(@info_request.date_response_required_by) + "</strong>.</p>" redirect_to request_url(@info_request) elsif @info_request.calculate_status == 'waiting_response_overdue' - flash[:notice] = "<p>Thank you! Hope you don't have to wait much longer.</p> <p>By law, you should have got a response before the end of <strong>" + simple_date(@info_request.date_response_required_by) + "</strong>.</p>" + flash[:notice] = "<p>Thank you! Hope you don't have to wait much longer.</p> <p>By law, you should have got a response promptly, and normally before the end of <strong>" + simple_date(@info_request.date_response_required_by) + "</strong>.</p>" redirect_to request_url(@info_request) elsif @info_request.calculate_status == 'not_held' flash[:notice] = "<p>Thank you! Here are some ideas on what to do next:</p> diff --git a/app/models/holiday.rb b/app/models/holiday.rb index cf67e6963..422ddf291 100644 --- a/app/models/holiday.rb +++ b/app/models/holiday.rb @@ -21,20 +21,20 @@ # Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: holiday.rb,v 1.8 2009-09-17 21:30:15 francis Exp $ +# $Id: holiday.rb,v 1.9 2009-10-02 22:56:35 francis Exp $ class Holiday < ActiveRecord::Base # Calculate the date on which a request made on a given date falls due. # i.e. it is due by the end of that day. - def Holiday.due_date_from(start_date) + def Holiday.due_date_from(start_date, working_days = 20) # convert date/times into dates start_date = start_date.to_date # TODO only fetch holidays after the start_date holidays = self.all.collect { |h| h.day }.to_set - # Count forward 20 working days. We start with today as "day zero". The + # Count forward (20) working days. We start with today as "day zero". The # first of the twenty full working days is the next day. We return the # date of the last of the twenty. @@ -47,7 +47,7 @@ class Holiday < ActiveRecord::Base response_required_by = start_date # Now step forward into each of the 20 days. - while days_passed < 20 + while days_passed < working_days response_required_by += 1.day next if response_required_by.wday == 0 || response_required_by.wday == 6 # weekend next if holidays.include?(response_required_by) diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 17a19d0e4..10e26d48d 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -24,7 +24,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.208 2009-10-01 12:01:26 francis Exp $ +# $Id: info_request.rb,v 1.209 2009-10-02 22:56:35 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -558,8 +558,9 @@ public return Holiday.due_date_from(last_sent.outgoing_message.last_sent_at) end - def days_overdue - return Time.now.to_date - date_response_required_by.to_date + # Are we more than 20 working days overdue? + def working_days_20_overdue? + return Holiday.due_date_from(date_response_required_by.to_date, 20) <= Time.now.to_date end # Where the initial request is sent to diff --git a/app/models/public_body.rb b/app/models/public_body.rb index aef2d66a9..dd386d593 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -26,7 +26,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: public_body.rb,v 1.159 2009-09-17 21:10:05 francis Exp $ +# $Id: public_body.rb,v 1.160 2009-10-02 22:56:35 francis Exp $ require 'csv' require 'set' @@ -281,6 +281,11 @@ class PublicBody < ActiveRecord::Base end end + # Schools are allowed more time in holidays, so we change some wordings + def is_school? + return self.has_tag?('school') + end + # The "internal admin" is a special body for internal use. def PublicBody.internal_admin_body pb = PublicBody.find_by_url_name("internal_admin_authority") diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml index 5baea6ed0..41974573a 100644 --- a/app/views/help/about.rhtml +++ b/app/views/help/about.rhtml @@ -132,19 +132,18 @@ href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/prac <dd> <p>By law public authorities must respond "promptly", and in most cases not -later than 20 working days after receiving your request. The date of that hard -limit is shown on the page for your request. </p> +later than 20 working days after receiving your request. That date +is shown on the page for your request. </p> <p>You will be emailed if this date goes by without a response, so you can send -the public authority another note to remind them that they are breaking the -law. </p> +the public authority another note to remind them if they are breaking the +law.</p> -<p><strong>Note:</strong> If you had to -clarify your request, the clock starts from that date, instead of the date they -received your initial request.</p> - -<p>See '<a href="#days">You've calculated our deadline wrongly!</a>' for -more details.</p> +<p>There are some cases where the authority is legally allowed to go beyond the +20 day period, such as if you had to clarify your request, or if they are a +school. They will normally say if they are invoking such a reason. +See '<a href="#days">You've calculated our deadline wrongly!</a>' for +details about what is allowed.</p> </dd> @@ -496,10 +495,15 @@ to have more of that complexity visible.</p> <dd> -<p>The answer to the previous question not withstanding, WhatDoTheyKnow does -attempt to show the maximum legal deadline for response to each request. Here is -the complex detail of how we calculate it, and some things we currently get -wrong.</p> +<p>Please read the answer to the previous question first. Legally, authorities +must respond <strong>promptly</strong> to FOI requests. If they fail to do that, +it is best if they show the hard work they are doing by explaining what is +taking the extra time to do. +</p> + +<p>That said, WhatDoTheyKnow does attempt to show the maximum legal deadline +for response to each request. Here is the complex detail of how we calculate +it.</p> <ul> @@ -511,21 +515,29 @@ We then count the next working day as "day one", and so on up to 20 days.</li> the next working day as "day one". Delivery is delivery, even if it happened on the weekend. Some authorities <a href="http://www.whatdotheyknow.com/request/policy_regarding_body_scans#incoming-1100">disagree with this</a>, our lawyer disagrees with them. </li> -<li>We don't currently count extensions for Public Interest tests. Sorry -about that, we're working on how best to present it on the site.</li> +<li>In theory, authorities can claim a time extension for applying a public +interest test. We don't think this should be a special reason for delay. There +are lots of other good reasons the authority might need more time, such as if +somebody is on holiday and they can't find the information. We prefer it if +authorities simply apologise and explain what they are doing that is taking the +extra time, rather than resorting to legal minutiae. +</li> + -<li>Since June 2009, schools now have "20 working days disregarding any working -day which is not a school day, or 60 working days, whichever is first". We -don't currently allow for that, but intend to in some way, especially if we add -more schools.</li> +<li>Since June 2009, schools have "20 working days disregarding any working +day which is not a school day, or 60 working days, whichever is first". Basically, +cut them some slack if it is holiday time. +</li> <li>Requesters are encouraged to mark when they have clarified their request so the clock resets, but sometimes they get this wrong. If you see a problem with a particular request, let us know and we'll fix it.</li> - </ul> +<p>If you're getting really nerdy about this, read the <a href="http://www.ico.gov.uk/upload/documents/library/freedom_of_information/detailed_specialist_guides/timeforcompliance.pdf">detailed ICO guidance</a>. Meanwhile, +remember that the law says authorities must respond <strong>promptly</strong>. + </dd> <dt id="large_file">How can I send a large file, which won't go by email?<a href="#large_file">#</a> </dt> diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml index 5c07b1b67..4e78ce8f7 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.rhtml @@ -37,14 +37,23 @@ <% end %> <% if @info_request.calculate_status == 'waiting_response_overdue' %> - <p>This request is currently <strong>overdue a response</strong> from <%= - public_body_link(@info_request.public_body) %>. - By law, the response had to be prompt but no later than - <strong><%= simple_date(@info_request.date_response_required_by) %></strong> - (<%= link_to "more info", about_url + "#quickly_response" %>). You can say - that under the <%=h(@info_request.law_used_act)%> they should have replied by now, - and are breaking the law. - </p> + <p> + <% if @info_request.working_days_20_overdue? %> + This request is <strong>long overdue a response</strong>. + <% else %> + This request is <strong>overdue a response</strong>. + <% end %> + You can say that, by law, the authority should have answered + <strong>promptly</strong>. If they have not given you a legal + reason why they need extra time + (<%= link_to "more details", about_url + "#quickly_response" %>), then + you can say they are breaking the law to have not replied by + <strong><%= simple_date(@info_request.date_response_required_by) %></strong>. + <% if @info_request.public_body.is_school? %> + This is a school, so legally they get lots of extra slack if it is + holiday time. + <% end %> + </p> <% end %> <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml index f3bc03688..5b89a6d12 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.rhtml @@ -59,16 +59,25 @@ they <%= link_to "must respond", about_url + "#quickly_response" %> promptly but no later than <strong><%= simple_date(@info_request.date_response_required_by) %></strong>. <% elsif @status == 'waiting_response_overdue' %> - Currently <strong>overdue a response</strong> from <%= - public_body_link(@info_request.public_body) %>. By law, - the response had to be prompt but - <%= link_to "no later", about_url + "#quickly_response" %> - than <strong><%= simple_date(@info_request.date_response_required_by) %></strong>. - - <% if @info_request.days_overdue > 14 %> - They are <%= @info_request.days_overdue.to_i %> days late, you - can <strong>complain</strong> by + <% if @info_request.working_days_20_overdue? %> + This request is <strong>long overdue a response</strong>. + By law, <%= public_body_link(@info_request.public_body) %> + should normally have answered by + <strong><%= simple_date(@info_request.date_response_required_by) %></strong> + (<%= link_to "more details", about_url + "#quickly_response" %>). + You can <strong>complain</strong> by <%= link_to "requesting an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. + <% else %> + This request is <strong>overdue a response</strong>. + By law, <%= public_body_link(@info_request.public_body) %> + should normally have answered by + <strong><%= simple_date(@info_request.date_response_required_by) %></strong>. + If they need extra time they should have told you + why (<%= link_to "more details", about_url + "#quickly_response" %>). + <% end %> + <% if @info_request.public_body.is_school? %> + This is a school, so legally they get lots of extra slack if it is + holiday time. <% end %> <% elsif @status == 'not_held' %> diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml index ca8cbdf44..ab2faf212 100644 --- a/app/views/request_mailer/overdue_alert.rhtml +++ b/app/views/request_mailer/overdue_alert.rhtml @@ -1,10 +1,10 @@ <%= @info_request.public_body.name %> are late. They have not replied to your <%=@info_request.law_used_short%> request '<%= @info_request.title %>' -within the 20 working days they are allowed by law. +promptly, as required by law. Click on the link below to send a message to <%= @info_request.public_body.name -%> reminding them to reply to your request. +%> reminding them to reply to your request. <% if @info_request.public_body.is_school? %> This is a school, so legally they get lots of extra slack if it is holiday time. <% end %> <%=@url%> diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 3d9a2940a..4f8e5c2d6 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -817,7 +817,7 @@ describe RequestController, "sending overdue request alerts" do deliveries = ActionMailer::Base.deliveries deliveries.size.should == 1 mail = deliveries[0] - mail.body.should =~ /20 working days/ + mail.body.should =~ /promptly, as required by law/ mail.to_addrs.to_s.should == info_requests(:naughty_chicken_request).user.name_and_email mail.body =~ /(http:\/\/.*\/c\/(.*))/ @@ -1,32 +1,3 @@ - -1. ./views/request/show.rhtml - - Currently overdue a response from House of Commons. By law, the response had to - be prompt but no later than 17 September 2008. They are 365 days late, you can - complain by requesting an internal review. - -2. ./views/request/_followup.rhtml - - ... You can say that under the FOI act they should have replied by now, and - are breaking the law. - -3. ./controllers/request_controller.rb - - Thank you! Hopefully your wait isn't too long. By law, you should get a - response before the end of ... - -4. ./models/info_request.rb - Short description on search results etc. - "Response overdue." - -5. ./models/request_mailer.rb - Subject: You're overdue a response to your FOI request -6. ./views/request_mailer/overdue_alert.rhtml - They have not replied to your FOI request 'blah blah' within the 20 working - days they are allowed by law. - - Click on the link below to send a message to XXX reminding them to reply to - your request. - - - test if get_attachments_for_display called multiple times in one request? sending an email alert for this query takes crazy long |