diff options
author | Dave Arter <davea@mysociety.org> | 2017-02-17 16:32:50 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2017-02-20 10:49:32 +0000 |
commit | 5414433c85749c2baed87c3e6ba4a60bc8103577 (patch) | |
tree | fee7f8688eb7d4933ad6058aec9d2e18f9e499d3 /perllib/FixMyStreet/App/Controller | |
parent | 5df39f76b761d88dfa5ca86e8bf01a73115eba1c (diff) |
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
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin/ExorDefects.pm | 1 |
1 files changed, 1 insertions, 0 deletions
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 }, |