aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2016-12-07 11:39:59 +0000
committerDave Arter <davea@mysociety.org>2017-02-15 17:36:55 +0000
commit4d44ea5530a7dc25122e5135c19d89b4cebc5f40 (patch)
tree28ff117ae830534ccd37d3bdc70c8e5dba7f53e9 /perllib/FixMyStreet/DB/Result/Problem.pm
parentcd7e3087567b0fa7e64f52d802e5e911708a7eb8 (diff)
[Oxfordshire] Add Exor RDI file download feature
The RDI file format encapsulates information about inspections that have taken place, and can be uploaded into Exor to create defects in bulk. This commit adds a page to the Oxfordshire cobrand's admin allowing RDI files to be generated and downloaded from FMS. For mysociety/fixmystreetforcouncils#127
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index f469c4275..d78eda78f 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -1100,4 +1100,13 @@ has traffic_management_options => (
},
);
+has inspection_log_entry => (
+ is => 'ro',
+ lazy => 1,
+ default => sub {
+ my $self = shift;
+ return $self->admin_log_entries->search({ action => 'inspected' }, { order_by => { -desc => 'whenedited' } })->first;
+ },
+);
+
1;