diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-05-07 14:20:19 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-05-07 14:20:19 +0100 |
commit | cfabb3cfd4474c1c812ed325a068d56bafc43a08 (patch) | |
tree | ec610c101b45e4e2fcd7ad51673a24bd1ae126cd /perllib/FixMyStreet/Cobrand | |
parent | f6d807fd5217a19ac488f652d1f0853a7891231f (diff) | |
parent | a2cc36b0d94143d1150a73993541eb829bd9b9fa (diff) |
Merge branch 'category-group-in-csv'
Diffstat (limited to 'perllib/FixMyStreet/Cobrand')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bexley.pm | 27 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 12 |
2 files changed, 0 insertions, 39 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index f37394794..ad3036711 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -216,33 +216,6 @@ sub email_list { return @to; } -sub dashboard_export_problems_add_columns { - my $self = shift; - my $c = $self->{c}; - - my %groups; - if ($c->stash->{body}) { - %groups = FixMyStreet::DB->resultset('Contact')->search({ - body_id => $c->stash->{body}->id, - })->group_lookup; - } - - splice @{$c->stash->{csv}->{headers}}, 5, 0, 'Subcategory'; - splice @{$c->stash->{csv}->{columns}}, 5, 0, 'subcategory'; - - $c->stash->{csv}->{extra_data} = sub { - my $report = shift; - - if ($groups{$report->category}) { - return { - category => $groups{$report->category}, - subcategory => $report->category, - }; - } - return {}; - }; -} - sub _is_out_of_hours { my $time = localtime; return 1 if $time->hour > 16 || ($time->hour == 16 && $time->min >= 45); diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index b98ad1d8b..78b7c271a 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -245,16 +245,6 @@ sub dashboard_export_problems_add_columns { my $self = shift; my $c = $self->{c}; - my %groups; - if ($c->stash->{body}) { - %groups = FixMyStreet::DB->resultset('Contact')->search({ - body_id => $c->stash->{body}->id, - })->group_lookup; - } - - splice @{$c->stash->{csv}->{headers}}, 5, 0, 'Subcategory'; - splice @{$c->stash->{csv}->{columns}}, 5, 0, 'subcategory'; - $c->stash->{csv}->{headers} = [ map { $_ eq 'Ward' ? 'Borough' : $_ } @{ $c->stash->{csv}->{headers} }, "Agent responsible", @@ -315,8 +305,6 @@ sub dashboard_export_problems_add_columns { my $fields = { acknowledged => $report->whensent, agent_responsible => $agent ? $agent->name : '', - category => $groups{$report->category}, - subcategory => $report->category, user_name_display => $user_name_display, safety_critical => $safety_critical, delivered_to => join(',', @$delivered_to), |