aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/request_controller.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 0c3ee596f..2605a7e05 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.156 2009-04-14 13:36:32 louise Exp $
+# $Id: request_controller.rb,v 1.157 2009-04-15 18:15:30 louise Exp $
class RequestController < ApplicationController
@@ -275,8 +275,18 @@ class RequestController < ApplicationController
end
# Make the state change
+ old_described_state = @info_request.described_state
@info_request.set_described_state(params[:incoming_message][:described_state])
+ # Log it if not made by user
+ if authenticated_user != @info_request.user
+ @info_request.log_event("status_update",
+ { :user_id => authenticated_user.id,
+ :old_described_state => old_described_state,
+ :described_state => @info_request.described_state,
+ })
+ end
+
if User.owns_every_request?(authenticated_user)
flash[:notice] = '<p>The request status has been updated</p>'
redirect_to request_url(@info_request)