aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm19
-rw-r--r--perllib/FixMyStreet/Cobrand/Buckinghamshire.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Lewisham.pm15
-rw-r--r--perllib/FixMyStreet/Cobrand/Oxfordshire.pm13
4 files changed, 52 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index a6d58504c..e1021eda9 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -165,5 +165,24 @@ sub open311_config {
$params->{extended_description} = 0;
}
+sub open311_config_updates {
+ my ($self, $params) = @_;
+ $params->{use_extended_updates} = 1;
+ $params->{endpoints} = {
+ service_request_updates => 'update.xml',
+ update => 'update.xml'
+ };
+}
+
+sub open311_pre_send {
+ my ($self, $row, $open311) = @_;
+
+ my $extra = $row->extra || {};
+ unless ( $extra->{title} ) {
+ $extra->{title} = $row->user->title;
+ $row->extra( $extra );
+ }
+}
+
1;
diff --git a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
index 783a565f1..fb074da85 100644
--- a/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Buckinghamshire.pm
@@ -100,6 +100,11 @@ sub open311_post_send {
$sender->send($row, $h);
}
+sub open311_config_updates {
+ my ($self, $params) = @_;
+ $params->{mark_reopen} = 1;
+}
+
sub map_type { 'Buckinghamshire' }
sub default_map_zoom { 3 }
diff --git a/perllib/FixMyStreet/Cobrand/Lewisham.pm b/perllib/FixMyStreet/Cobrand/Lewisham.pm
new file mode 100644
index 000000000..325f6e833
--- /dev/null
+++ b/perllib/FixMyStreet/Cobrand/Lewisham.pm
@@ -0,0 +1,15 @@
+package FixMyStreet::Cobrand::Lewisham;
+use base 'FixMyStreet::Cobrand::UK';
+
+use strict;
+use warnings;
+
+sub council_area_id { 2492 }
+
+sub open311_post_update_skip {
+ my ($self) = @_;
+ return 1;
+}
+
+1;
+
diff --git a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
index cac79a347..dafd6e069 100644
--- a/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Oxfordshire.pm
@@ -155,6 +155,19 @@ sub open311_config {
$params->{extended_description} = 'oxfordshire';
}
+sub open311_config_updates {
+ my ($self, $params) = @_;
+ $params->{use_customer_reference} = 1;
+}
+
+sub should_skip_sending_update {
+ my ($self, $update ) = @_;
+
+ # Oxfordshire stores the external id of the problem as a customer reference
+ # in metadata
+ return 1 if !$update->problem->get_extra_metadata('customer_reference');
+}
+
sub on_map_default_status { return 'open'; }
sub contact_email {