diff options
-rw-r--r-- | app/views/admin_general/timeline.html.erb | 2 | ||||
-rw-r--r-- | config/initializers/alaveteli.rb | 2 | ||||
-rw-r--r-- | doc/CHANGES.md | 16 | ||||
-rw-r--r-- | lib/tasks/temp.rake | 25 |
4 files changed, 34 insertions, 11 deletions
diff --git a/app/views/admin_general/timeline.html.erb b/app/views/admin_general/timeline.html.erb index 8fd8875b6..439ae1e68 100644 --- a/app/views/admin_general/timeline.html.erb +++ b/app/views/admin_general/timeline.html.erb @@ -88,7 +88,7 @@ <% elsif event.event_type == 'comment' %> had an annotation posted by <%=h event.comment.user.name %>. <% elsif event.event_type == 'status_update' %> - had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. + had its status updated by <%= event.params[:user_id] ? User.find(event.params[:user_id]).name : event.params[:script] %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. <% else %> had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>. <% end %> diff --git a/config/initializers/alaveteli.rb b/config/initializers/alaveteli.rb index deee3f6da..2c6ee2fbc 100644 --- a/config/initializers/alaveteli.rb +++ b/config/initializers/alaveteli.rb @@ -10,7 +10,7 @@ load "debug_helpers.rb" load "util.rb" # Application version -ALAVETELI_VERSION = '0.12' +ALAVETELI_VERSION = '0.13' # Add new inflection rules using the following format # (all these examples are active by default): diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 7a22f44e2..4720e5283 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -1,3 +1,19 @@ +# Version 0.13 +## Highlighted features + +* Fix for bug that resulted in some incorrect results when using search by request status [issue #460](https://github.com/mysociety/alaveteli/issues/460). You can view and fix requests with inconsistent state history using `rake temp:fix_bad_request_states` +* All status updates (whether by the request owner or another user) are now logged in the event history, for better audit) (Matthew Landauer) +* Fix for bug that dropped accented characters from URLs [issue #282](https://github.com/mysociety/alaveteli/issues/282) (zejn) +* A fix for a bug that produced binary mask errors when handling multibyte characters in responses [issue #991](https://github.com/mysociety/alaveteli/issues/991) +* Some locale fixes for locales with a dash in them [issue #998](https://github.com/mysociety/alaveteli/issues/998) and [issue #999](https://github.com/mysociety/alaveteli/issues/999). +* Some improvements in the labelling of defunct authorities (Matthew Somerville) +* The addition of a check on the status of the commonlib submodule to the rails-post-deploy script. + +## Upgrade notes +* Check out this version and run `rails-post-deploy` as usual. +* This release includes an update to the commonlib submodule - you should now be warned about this on running `rails-post-deploy`. You can update to the nw version with `git submodule update`. +* After deploying, run `rake temp:fix_bad_request_states` to find and list requests that have an inconsistent history - run `rake temp:fix_bad_request_states DRYRUN=0` to fix them. + # Version 0.12 ## Highlighted features * Remove support for theme stylesheet inclusion via template (deprecated in version 0.5) diff --git a/lib/tasks/temp.rake b/lib/tasks/temp.rake index 5dba4fb7a..f746338f0 100644 --- a/lib/tasks/temp.rake +++ b/lib/tasks/temp.rake @@ -24,6 +24,7 @@ namespace :temp do :described_state => info_request.described_state, :calculated_state => info_request.described_state, :params => params) + info_request.info_request_events.each{ |event| event.mark_needs_xapian_index } end end @@ -43,15 +44,21 @@ namespace :temp do total_messages = 0 messages_to_reparse = 0 IncomingMessage.find_each :include => :foi_attachments do |im| - reparse = im.foi_attachments.any? { |fa| ! File.exists? fa.filepath } - total_messages += 1 - messages_to_reparse += 1 if reparse - if total_messages % 1000 == 0 - puts "Considered #{total_messages} received emails." - end - unless dry_run - im.parse_raw_email! true if reparse - sleep 2 + begin + reparse = im.foi_attachments.any? { |fa| ! File.exists? fa.filepath } + total_messages += 1 + messages_to_reparse += 1 if reparse + if total_messages % 1000 == 0 + puts "Considered #{total_messages} received emails." + end + unless dry_run + im.parse_raw_email! true if reparse + sleep 2 + end + rescue StandardError => e + puts "There was a #{e.class} exception reparsing IncomingMessage with ID #{im.id}" + puts e.backtrace + puts e.message end end message = dry_run ? "Would reparse" : "Reparsed" |