diff options
author | francis <francis> | 2008-05-21 22:37:32 +0000 |
---|---|---|
committer | francis <francis> | 2008-05-21 22:37:32 +0000 |
commit | 7fd83d90dc8b867e098b82d7c72d2d8029bfd479 (patch) | |
tree | 9db3b9d825f6f2bb75af3fb2f8b983eceaef5b01 /app/models/info_request.rb | |
parent | c0951f93e5d33fd7158f433730fe535ad20182f4 (diff) |
Show people tracking same query, when you are on search page.
Put name of admin user rather than import_csv.
Send automated email to remind people to clarify their request.
Send response overdue alerts multiple times for one request (if it becomes
overdue again after a clarification etc.)
Overdue response alert email click through shows how many days overdue it is
near where you write your reply.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index ece806009..14cd503ba 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -22,7 +22,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.113 2008-05-21 10:51:24 francis Exp $ +# $Id: info_request.rb,v 1.114 2008-05-21 22:37:33 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -262,7 +262,7 @@ public # -- sent at all # -- OR the same message was resent # -- OR the public body requested clarification, and a follow up was sent - def last_outgoing_message_forming_initial_request + def last_event_forming_initial_request last_sent = nil expecting_clarification = false for event in self.info_request_events @@ -271,14 +271,12 @@ public end if [ 'sent', 'resent', 'followup_sent' ].include?(event.event_type) - outgoing_message = event.outgoing_message - if last_sent.nil? - last_sent = outgoing_message + last_sent = event elsif event.event_type == 'resent' - last_sent = outgoing_message + last_sent = event elsif expecting_clarification and event.event_type == 'followup_sent' - last_sent = outgoing_message + last_sent = event expecting_clarification = false end end @@ -297,12 +295,15 @@ public # # Freedom of Information Act 2000 section 10 # - # XXX how do we cope with case where extra info was required from the requester - # by the public body in order to fulfill the request, as per sections 1(3) and 10(6b) ? + # How do we cope with case where extra info was required from the requester + # by the public body in order to fulfill the request, as per sections 1(3) + # and 10(6b) ? For clarifications this is covered by + # last_event_forming_initial_request. There may be more obscure + # things, e.g. fees, not properly covered. def date_response_required_by # Find the ear - last_sent = self.last_outgoing_message_forming_initial_request - last_sent_at = last_sent.last_sent_at + last_sent = self.last_event_forming_initial_request + last_sent_at = last_sent.outgoing_message.last_sent_at # Count forward 20 working days days_passed = 0 |