diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-20 09:43:38 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-12-20 14:24:51 +0000 |
commit | 5724c6adf8db7cca611fcc000e6fa4e995fcc2bd (patch) | |
tree | 5d2dfe04d5606d07413e113af9f2ea0ddbac9d6f /perllib/FixMyStreet/DB/Result/Questionnaire.pm | |
parent | 649692298b0b870b161a3f8b755f46b16b534e48 (diff) |
Show all questionnaire responses lacking updates.
Since questionnaire responses were recorded on email link click, we
should have been showing those that reopened or fixed reports, not
just steady-state "Still open" ones.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Questionnaire.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Questionnaire.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Questionnaire.pm b/perllib/FixMyStreet/DB/Result/Questionnaire.pm index 30f2ab7ce..6b7ab9452 100644 --- a/perllib/FixMyStreet/DB/Result/Questionnaire.pm +++ b/perllib/FixMyStreet/DB/Result/Questionnaire.pm @@ -57,4 +57,11 @@ my $stz = sub { around whensent => $stz; around whenanswered => $stz; +sub marks_fixed { + my $self = shift; + my $new_fixed = FixMyStreet::DB::Result::Problem->fixed_states()->{$self->new_state}; + my $old_fixed = FixMyStreet::DB::Result::Problem->fixed_states()->{$self->old_state}; + return $new_fixed && !$old_fixed; +} + 1; |