From 638c5d3be601c3949f1d1ce7ecae5d8b77ad8f7c Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Tue, 30 Aug 2016 18:48:07 +0100 Subject: =?UTF-8?q?Add=20=E2=80=98Inspection=20required=E2=80=99=20field?= =?UTF-8?q?=20to=20categories?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Categories can now require reports to be marked as 'inspected' via the frontend before they're sent by send-reports. A side-effect here is that send-reports will perform an extra n queries for each report, where n is the number of bodies that report is being sent to, but hopefully in practice this won't matter as it's an offline cronjob. See mysociety/fixmystreetforcouncils#50 --- perllib/FixMyStreet/App/Controller/Report.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Report.pm') diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 2f6418886..7f1132117 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -318,13 +318,17 @@ sub inspect : Private { } } - if ( $c->get_param('save') ) { + if ( $c->get_param('save') || $c->get_param('save_inspected') ) { $c->forward('/auth/check_csrf_token'); foreach (qw/priority detailed_location detailed_information traffic_information/) { $problem->set_extra_metadata( $_ => $c->get_param($_) ); } + if ( $c->get_param('save_inspected') ) { + $problem->set_extra_metadata( inspected => 1 ); + } + # Handle the state changing my $old_state = $problem->state; $problem->state($c->get_param('state')); -- cgit v1.2.3