diff options
Diffstat (limited to 'perllib/FixMyStreet/DB')
-rw-r--r-- | perllib/FixMyStreet/DB/Factories.pm | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/DB/Factories.pm b/perllib/FixMyStreet/DB/Factories.pm index ec4dd630a..7b8234aec 100644 --- a/perllib/FixMyStreet/DB/Factories.pm +++ b/perllib/FixMyStreet/DB/Factories.pm @@ -118,7 +118,7 @@ use parent "DBIx::Class::Factory"; __PACKAGE__->resultset(FixMyStreet::DB->resultset("ResponsePriority")); __PACKAGE__->fields({ - name => __PACKAGE__->seq(sub { 'Priority #' . (shift()+1) }), + name => __PACKAGE__->seq(sub { 'Priority ' . (shift()+1) }), description => __PACKAGE__->seq(sub { 'Description #' . (shift()+1) }), }); diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 3866532e9..8625bf17a 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -867,6 +867,17 @@ sub update_send_failed { } ); } +sub add_send_method { + my $self = shift; + my $sender = shift; + ($sender = ref $sender) =~ s/^.*:://; + if (my $send_method = $self->send_method_used) { + $self->send_method_used("$send_method,$sender"); + } else { + $self->send_method_used($sender); + } +} + sub as_hashref { my $self = shift; my $c = shift; |