aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Comment.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-06-01 07:50:28 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-06-10 09:54:28 +0100
commiteb8d1b6f0aed5773c08d76041bc5aec57cbc4a31 (patch)
tree48dd2ec13475a668d98f50395e22354235caa001 /perllib/FixMyStreet/DB/Result/Comment.pm
parent831943b1320841f3b9383c1e493840f9f657744c (diff)
Refactor pretty state display.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Comment.pm20
1 files changed, 2 insertions, 18 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm
index 815c5cd81..d59245c15 100644
--- a/perllib/FixMyStreet/DB/Result/Comment.pm
+++ b/perllib/FixMyStreet/DB/Result/Comment.pm
@@ -174,22 +174,6 @@ sub photos {
return \@photos;
}
-=head2 problem_state_display
-
-Returns a string suitable for display lookup in the update meta section.
-Removes the '- council/user' bit from fixed states.
-
-=cut
-
-sub problem_state_display {
- my $self = shift;
-
- my $state = $self->problem_state;
- $state =~ s/ -.*$//;
-
- return $state;
-}
-
=head2 latest_moderation_log_entry
Return most recent ModerationLog object
@@ -269,7 +253,7 @@ sub meta_line {
} elsif ($self->mark_open) {
$update_state = _( 'reopened' );
} elsif ($self->problem_state) {
- my $state = $self->problem_state_display;
+ my $state = $self->problem_state;
if ($state eq 'confirmed') {
if ($c->stash->{last_state}) {
@@ -285,7 +269,7 @@ sub meta_line {
$update_state = _( 'marked as action scheduled' )
} elsif ($state eq 'closed') {
$update_state = _( 'marked as closed' )
- } elsif ($state eq 'fixed') {
+ } elsif ($state =~ /^fixed/) {
$update_state = _( 'marked as fixed' )
} elsif ($state eq 'unable to fix') {
$update_state = _( 'marked as no further action' )