aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/DB/Result/Problem.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-10-13 17:49:04 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-10-13 17:49:04 +0100
commit8ab9812e6cd5f686f7ab4d9a9859e8be4456ccd0 (patch)
tree5bf1a9d25d2707a70c023a8aa53cf01cbe2f8d71 /perllib/FixMyStreet/DB/Result/Problem.pm
parent9fc69a31cda118948e3714bc7f4fff9d0a3ca84e (diff)
parentb86c2142d2f82fb503807feae0a8df4b8af39571 (diff)
Merge branch 'issues/forcouncils/86-show-shortlist-reports'
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r--perllib/FixMyStreet/DB/Result/Problem.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm
index 27648ddad..855732f83 100644
--- a/perllib/FixMyStreet/DB/Result/Problem.pm
+++ b/perllib/FixMyStreet/DB/Result/Problem.pm
@@ -1020,4 +1020,16 @@ sub static_map {
};
}
+has shortlisted_user => (
+ is => 'ro',
+ lazy => 1,
+ default => sub {
+ my $self = shift;
+ my $user = $self->result_source->schema->resultset('User')->search(
+ { 'user_planned_reports.report_id' => $self->id },
+ { join => 'user_planned_reports' })->first;
+ return $user;
+ },
+);
+
1;