From 5414433c85749c2baed87c3e6ba4a60bc8103577 Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Fri, 17 Feb 2017 16:32:50 +0000 Subject: Reports need external_id to be included in RDI download Reports in the generated Exor RDI file need to have an external_id so they can be linked to existing enquiries (PEMs) when the RDI is imported into Exor. There is a small window of opportunity for a report to be created, inspected and downloaded in an RDI before it's been sent to Exor via Open311 and had an external_id assigned. This commit closes that window by excluding reports from the RDI that don't have an external_id. Fixes mysociety/fixmystreetforcouncils#168 --- perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm b/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm index 164a4b42d..013d710af 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm @@ -57,6 +57,7 @@ sub download : Path('download') : Args(0) { my %params = ( -and => [ state => [ 'action scheduled' ], + external_id => { '!=' => undef }, 'admin_log_entries.action' => 'inspected', 'admin_log_entries.whenedited' => { '>=', $start_date }, 'admin_log_entries.whenedited' => { '<=', $end_date + $one_day }, -- cgit v1.2.3