diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-11-22 22:06:53 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2018-11-26 12:49:23 +0000 |
commit | c69891dffcb3810ebb951af4a563c556b2deeb0d (patch) | |
tree | 3ba5a477e0f5d92062c94c032c2f9c9a4feb3e86 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | eb2aba46eabc8d90656b760cf4900f56119de9ca (diff) |
Show moderation history in report/update admin.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index ffc6aba93..a7884f7d2 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -973,6 +973,13 @@ sub latest_moderation_log_entry { return $self->admin_log_entries->search({ action => 'moderation' }, { order_by => { -desc => 'id' } })->first; } +sub moderation_history { + my $self = shift; + return $self->moderation_original_datas->search({ + comment_id => undef, + }, { order_by => { -desc => 'id' } })->all; +} + __PACKAGE__->has_many( "admin_log_entries", "FixMyStreet::DB::Result::AdminLog", |