diff options
Diffstat (limited to 'perllib/Open311')
-rw-r--r-- | perllib/Open311/GetServiceRequestUpdates.pm | 5 | ||||
-rw-r--r-- | perllib/Open311/PopulateServiceList.pm | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/perllib/Open311/GetServiceRequestUpdates.pm b/perllib/Open311/GetServiceRequestUpdates.pm index 3b436aaa7..8193aaa9b 100644 --- a/perllib/Open311/GetServiceRequestUpdates.pm +++ b/perllib/Open311/GetServiceRequestUpdates.pm @@ -86,6 +86,8 @@ sub update_comments { return 0; } + my $cobrand = $body->get_cobrand_handler; + for my $request (@$requests) { my $request_id = $request->{service_request_id}; @@ -191,6 +193,9 @@ sub update_comments { $comment->state('hidden') unless $comment->text || $comment->photo || ($comment->problem_state && $state ne $old_state); + $cobrand->call_hook(open311_get_update_munging => $comment) + if $cobrand; + # As comment->created has been looked at above, its time zone has been shifted # to TIME_ZONE (if set). We therefore need to set it back to local before # insertion. We also then need a clone, otherwise the setting of lastupdate diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index d506111ec..ad7288c62 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -226,7 +226,7 @@ sub _add_meta_to_contact { # turn the data into something a bit more friendly to use my @meta = # remove trailing colon as we add this when we display so we don't want 2 - map { $_->{description} =~ s/:\s*//; $_ } + map { $_->{description} =~ s/:\s*$//; $_ } # there is a display order and we only want to sort once sort { $a->{order} <=> $b->{order} } @{ $meta_data->{attributes} }; |