aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-06-19 17:28:47 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-11-11 10:29:20 +0000
commitb8fb6677b54f99e53105de0e242be94969a53567 (patch)
tree05311d8922b0064177bbf2939df7867d6c127b21 /perllib
parentd90e1157ee31c374248da0db42b70456c37ddd5b (diff)
[Bromley] Treat some enquiries same as missed.
In terms of within-two-day and no existing open event.
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm3
-rw-r--r--perllib/Integrations/Echo.pm5
2 files changed, 7 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index 8b6924f2d..24210e3d6 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -546,6 +546,7 @@ sub bin_services_for_address {
request_open => $open_request,
request_containers => $containers,
request_max => $quantity_max{$_->{ServiceId}},
+ enquiry_open_events => $open->{enquiry},
service_task_id => $servicetask->{Id},
service_task_name => $servicetask->{TaskTypeName},
service_task_type_id => $servicetask->{TaskTypeId},
@@ -585,6 +586,8 @@ sub _parse_open_events {
} elsif (2095 <= $event_type && $event_type <= 2103) { # Missed collection
my $report = $self->problems->search({ external_id => $_->{Guid} })->first;
$open->{missed}->{$service_id} = $report ? { report => $report } : 1;
+ } else { # General enquiry of some sort
+ $open->{enquiry}->{$event_type} = 1;
}
}
return $open;
diff --git a/perllib/Integrations/Echo.pm b/perllib/Integrations/Echo.pm
index 205e1178f..48a0edc6c 100644
--- a/perllib/Integrations/Echo.pm
+++ b/perllib/Integrations/Echo.pm
@@ -295,9 +295,12 @@ sub GetEventsForObject {
my ($self, $id, $type) = @_;
my $from = DateTime->now->set_time_zone(FixMyStreet->local_time_zone)->subtract(months => 3);
return [ {
- # Missed collection for service 542
+ # Missed collection for service 542 (food waste)
EventTypeId => 2100,
ServiceId => 542,
+ }, { # And a gate not closed
+ EventTypeId => 2118,
+ ServiceId => 542,
}, {
# Request for a new paper container
EventTypeId => 2104,