diff options
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Comment.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Comment.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Comment.pm b/perllib/FixMyStreet/DB/Result/Comment.pm index 81aa18b95..76c96e581 100644 --- a/perllib/FixMyStreet/DB/Result/Comment.pm +++ b/perllib/FixMyStreet/DB/Result/Comment.pm @@ -146,6 +146,22 @@ sub get_photo_params { return $photo; } +=head2 meta_problem_state + +Returns a string suitable for display in the update meta section. +Mostly removes the '- council/user' bit from fixed states + +=cut + +sub meta_problem_state { + my $self = shift; + + my $state = $self->problem_state; + $state =~ s/ -.*$//; + + return $state; +} + # we need the inline_constructor bit as we don't inherit from Moose __PACKAGE__->meta->make_immutable( inline_constructor => 0 ); |