From 72809e405e690c88d0e2011802820c9ba215ef61 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Mon, 11 May 2020 16:06:37 +0100 Subject: Consistent use of Contact groups. --- perllib/FixMyStreet/App/Controller/Admin/Templates.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Admin/Templates.pm') diff --git a/perllib/FixMyStreet/App/Controller/Admin/Templates.pm b/perllib/FixMyStreet/App/Controller/Admin/Templates.pm index efff1b488..f933c5f8a 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/Templates.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/Templates.pm @@ -69,7 +69,7 @@ sub edit : Path : Args(2) { category => $_->category_display, active => $active_contacts{$_->id}, email => $_->email, - group => $_->get_extra_metadata('group') // '', + group => $_->groups, } } @live_contacts; $c->stash->{contacts} = \@all_contacts; $c->forward('/report/stash_category_groups', [ \@all_contacts, 1 ]) if $c->cobrand->enable_category_groups; -- cgit v1.2.3 From 2e1c10996a0a08b9bf50af05300fef5c253854e7 Mon Sep 17 00:00:00 2001 From: M Somerville Date: Mon, 5 Oct 2020 14:16:42 +0100 Subject: [Bromley] Nuanced template resolution codes. Have the response template external status code be a combination of resolution code, task type ID, and task state. --- perllib/FixMyStreet/App/Controller/Admin/Templates.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perllib/FixMyStreet/App/Controller/Admin/Templates.pm') diff --git a/perllib/FixMyStreet/App/Controller/Admin/Templates.pm b/perllib/FixMyStreet/App/Controller/Admin/Templates.pm index f933c5f8a..9fb401e2b 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/Templates.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/Templates.pm @@ -100,7 +100,10 @@ sub edit : Path : Args(2) { $template->text( $c->get_param('text') ); $template->state( $c->get_param('state') ); - $template->external_status_code( $c->get_param('external_status_code') ); + + my $ext_code = $c->cobrand->call_hook('admin_templates_external_status_code_hook'); + $ext_code ||= $c->get_param('external_status_code'); + $template->external_status_code($ext_code); if ( $template->state && $template->external_status_code ) { $c->stash->{errors} ||= {}; -- cgit v1.2.3