aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2019-02-13 13:48:29 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2019-02-15 13:40:05 +0000
commitf0eab21555efca2218d3cc49cf435ea09d03ac4b (patch)
treeee2f22effcc340f506176047a0417e2a910681ba
parent558438e9750a29d98584edf345366a23ca0b2092 (diff)
[Bromley] Store service_sub_code as subcategory.
-rw-r--r--perllib/FixMyStreet/Cobrand/Bromley.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bromley.pm b/perllib/FixMyStreet/Cobrand/Bromley.pm
index 386e1a269..9e3919901 100644
--- a/perllib/FixMyStreet/Cobrand/Bromley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bromley.pm
@@ -20,6 +20,15 @@ sub report_validation {
return $errors;
}
+# This makes sure that the subcategory Open311 attribute question is
+# also stored in the report's subcategory column. This could be done
+# in process_open311_extras, but seemed easier to keep that separate
+sub report_new_munge_before_insert {
+ my ($self, $report) = @_;
+
+ $report->subcategory($report->get_extra_field_value('service_sub_code'));
+}
+
sub base_url {
my $self = shift;
return $self->next::method() if FixMyStreet->config('STAGING_SITE');