aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/info_request.rb22
-rw-r--r--app/models/info_request_event.rb62
-rw-r--r--app/views/request/_request_listing_via_event.rhtml3
-rw-r--r--todo.txt58
4 files changed, 87 insertions, 58 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index ff00235ed..0b038bc25 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -23,7 +23,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.153 2008-11-07 00:01:50 francis Exp $
+# $Id: info_request.rb,v 1.154 2008-11-10 11:18:39 francis Exp $
require 'digest/sha1'
require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian')
@@ -372,7 +372,7 @@ public
def calculate_event_states
curr_state = nil
for event in self.info_request_events.reverse
- if not event.described_state.nil? and curr_state.nil?
+ if !event.described_state.nil? && curr_state.nil?
curr_state = event.described_state
#STDERR.puts "curr_state " + curr_state
end
@@ -389,10 +389,20 @@ public
end
curr_state = nil
elsif !curr_state.nil? && event.event_type == 'followup_sent' && !event.described_state.nil? && (event.described_state == 'waiting_response' || event.described_state == 'internal_review')
- # followups can set the status to waiting response / internal
- # review, which we don't want to propogate to the response
- # itself, as that might already be set to waiting_clarification
- # / a success status, which we want to know about.
+ # Followups can set the status to waiting response / internal
+ # review.
+
+ # We want to store that in calculated_state state so it gets
+ # indexed.
+ if event.calculated_state != event.described_state
+ event.calculated_state = event.described_state
+ event.last_described_at = Time.now()
+ event.save!
+ end
+
+ # And we don't want to propogate it to the response itself,
+ # as that might already be set to waiting_clarification / a
+ # success status, which we want to know about.
curr_state = nil
end
end
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 8595e3669..d16571d1a 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request_event.rb,v 1.67 2008-11-06 14:53:07 francis Exp $
+# $Id: info_request_event.rb,v 1.68 2008-11-10 11:18:39 francis Exp $
class InfoRequestEvent < ActiveRecord::Base
belongs_to :info_request
@@ -194,31 +194,45 @@ class InfoRequestEvent < ActiveRecord::Base
# Display version of status
def display_status
- if incoming_message.nil?
- raise "display_status only works for incoming messages right now"
- end
- status = self.calculated_state
- if status == 'waiting_response'
- "Acknowledgement"
- elsif status == 'waiting_clarification'
- "Clarification required"
- elsif status == 'gone_postal'
- "Handled by post"
- elsif status == 'not_held'
- "Information not held"
- elsif status == 'rejected'
- "Rejection"
- elsif status == 'partially_successful'
- "Some information sent"
- elsif status == 'successful'
- "All information sent"
- elsif status == 'internal_review'
- "Internal review acknowledgement"
- elsif status == 'requires_admin'
- "Unusual response"
- else
+ if !incoming_message.nil?
+ status = self.calculated_state
+ if status == 'waiting_response'
+ return "Acknowledgement"
+ elsif status == 'waiting_clarification'
+ return "Clarification required"
+ elsif status == 'gone_postal'
+ return "Handled by post"
+ elsif status == 'not_held'
+ return "Information not held"
+ elsif status == 'rejected'
+ return "Rejection"
+ elsif status == 'partially_successful'
+ return "Some information sent"
+ elsif status == 'successful'
+ return "All information sent"
+ elsif status == 'internal_review'
+ return "Internal review acknowledgement"
+ elsif status == 'requires_admin'
+ return "Unusual response"
+ end
raise "unknown status " + status
end
+
+ if !outgoing_message.nil?
+ status = self.calculated_state
+ if !status.nil?
+ if status == 'internal_review'
+ return "Internal review request"
+ end
+ if status == 'waiting_response'
+ return "Clarification"
+ end
+ raise "unknown status " + status
+ end
+ return "Follow up"
+ end
+
+ raise "display_status only works for incoming and outgoing messages right now"
end
def is_sent_sort?
diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml
index dccb596c9..76200f63c 100644
--- a/app/views/request/_request_listing_via_event.rhtml
+++ b/app/views/request/_request_listing_via_event.rhtml
@@ -29,7 +29,8 @@ end %>
by <%= user_link(info_request.user) %>
on <%= simple_date(event.created_at) %>.
<% elsif event.event_type == 'followup_sent' %>
- Follow up sent to <%= public_body_link(info_request.public_body) %>
+ <%=event.display_status %>
+ sent to <%= public_body_link(info_request.public_body) %>
by <%= user_link(info_request.user) %>
on <%= simple_date(event.created_at) %>.
<% elsif event.event_type == 'response' %>
diff --git a/todo.txt b/todo.txt
index 29af8e435..5479f2e7d 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,15 +1,21 @@
Test data for Tony
+
+grep for display_status
+
Internal review
===============
-If you've already conducted an internal review, at all places offer
-link through to ICO submitting help page instead.
-
+If you've already conducted an internal review, at all places
+- when on unhappy/url
+- when on not held link
+- on the page for the request
+don't offer it again.
Clock for internal review
"The internal review should take 2-3 weeks for simple cases, and up to 6 weeks
even for complex reviews."
+Awaiting internal review overdue state?
Search for text "internal review" in followups and add warning if they aren't
using the internal review mode.
@@ -18,6 +24,9 @@ using the internal review mode.
Next
====
+When writing initial request you have to put your name in the letter to sign it,
+but it only explains later about anonymous names, Hmmm.
+
Rename show_response action to send followup?
Finish "new information" option when writing followup, so makes new request
@@ -47,33 +56,14 @@ Performance:
Upload Julian's large Cambridgeshire contract
-Internal review status/marker?
- Quote section 38 as per Julian's request
- http://www.whatdotheyknow.com/request/search_engine_advertising_bought
+Watch these requests that are in internal review state or have been:
http://www.whatdotheyknow.com/request/communications_from_home_office
- http://www.whatdotheyknow.com/request/crime_investigation_following_al
- http://www.whatdotheyknow.com/request/determination_of_pricing_for_pro#incoming-2902
http://www.whatdotheyknow.com/request/community_justice_centre_sentenc
- http://www.whatdotheyknow.com/request/contracts_establishing_impact_pa
- my own veolia request
- http://www.whatdotheyknow.com/request/online_petitions_documents_from
- http://www.whatdotheyknow.com/request/ombudsmans_case_load#comment-21
- (search for phrase "internal review"!)
-Remember - internal reviews can be *aborted* if they just send the response :)
-
-Awaiting internal review overdue state?
-
-Request withdrawn by user status/marker?
-
-- When you say rejected and go to /help/unhappy should have link to
-do internal review.
-- When people say still waiting, give link to unhappy if it is late? Or put
-link on page when it is late?
+Gone to information commissioner
+ http://www.whatdotheyknow.com/request/local_government_ombudsman_2 - appeal to infocom
+ http://www.whatdotheyknow.com/request/please_submit_the_surveyors_repo
Clear out all the need admin attention requests
-Link to view raw email from the main page when you are super user logged in
-
-Show similar requests after you have filed yours - maybe on preview too.
Add "I have a large file" to FOI office FAQ
Add "Who should I make my request to?"
@@ -83,7 +73,8 @@ Add "Postal replies stuff" and link to from FOI officer upload page
Add "I'm not sure which authority to make my request to" - make flow better after first section, to abrupt now
Policy on officer names.
-CSS things
+CSS / design things
+ - Icon for internal_review
- CSS error on "all councils" page on some browsers
https://bugzilla.mozilla.org/show_bug.cgi?id=424194
- Spacing on error boxes round form elements
@@ -106,9 +97,17 @@ http://www.whatdotheyknow.com/request/recycling_levels_in_the_winchest
Include log files from exim in admin interface for each request
+Would be nice if you try and send or resend and original address is
+set to not_apply or "" that it deals with it better :)
+
+I still type stuff into notes rather than comments on public body form - not
+sure what to do about it.
+
Later
=====
+Show similar requests after you have filed yours - maybe on preview too.
+
Consider putting the request email address in footer? So when
forwarded about, address sticks there.
@@ -119,6 +118,10 @@ They are copy protected PDFs. The code in the incoming_message model tries to fi
that by converting them to ps and back, but the content is getting lost when doing, not
sure why. Perhaps instead patch poppler-utils so pdftohtml doesn't respect protection
either (code in pdftotext already has a #ifdef round it)
+Another one knackered, and isn't copy protected, but is like the output of
+converted via pdf2ps ones I suspect (i.e. very scanned):
+ http://www.whatdotheyknow.com/request/sale_of_public_land#incoming-8146
+File a bug in pdftohtml :)
Can use track count to show interesting requests
select info_request_id, title, count(*) as c from track_things, info_requests where track_things.info_request_id is not null and track_things.info_request_id = info_requests.id group by info_request_id, title order by c;
@@ -296,6 +299,7 @@ Quoting fixing TODO:
http://www.whatdotheyknow.com/request/function_council_88#incoming-6258
http://www.whatdotheyknow.com/request/please_submit_the_surveyors_repo#incoming-6334 # charset
+ http://www.whatdotheyknow.com/request/archive_record#incoming-7514 # charset
http://www.whatdotheyknow.com/request/enforcement_forders_for_replacin#incoming-6277 # over zealous quoting
http://www.whatdotheyknow.com/request/renewable_energy_consumption_by # over zealous