diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-07-11 17:50:52 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-07-12 17:22:39 +0100 |
commit | 056118883562df7f7cf4d917ffbac0a6f1f1faef (patch) | |
tree | 2570ec7ff966a7ca82c6fc38e5991844bd0144a7 /perllib/FixMyStreet/DB/ResultSet/Contact.pm | |
parent | 58fe7b2c649c29b09338c8ea76314aef29385bf5 (diff) |
[Bexley] Include subcategory in dashboard export.
Diffstat (limited to 'perllib/FixMyStreet/DB/ResultSet/Contact.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/ResultSet/Contact.pm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/ResultSet/Contact.pm b/perllib/FixMyStreet/DB/ResultSet/Contact.pm index 8ef6d1ac5..7b3258262 100644 --- a/perllib/FixMyStreet/DB/ResultSet/Contact.pm +++ b/perllib/FixMyStreet/DB/ResultSet/Contact.pm @@ -37,4 +37,13 @@ sub summary_count { ); } +sub group_lookup { + my $rs = shift; + map { + my $group = $_->get_extra_metadata('group') || ''; + $group = join(',', ref $group ? @$group : $group); + $_->category => $group + } $rs->all; +} + 1; |