diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-11-22 15:38:07 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-01-12 15:17:32 +0000 |
commit | 21877e063f8ab9c5914adbc88c8210d2393671ae (patch) | |
tree | 1cfddd54a9c1be03045ac4034920da6d4f73e22a /perllib/FixMyStreet/DB/Result/User.pm | |
parent | d967ee5ef454c8e3b91812bc2280a3969d0d6baa (diff) |
Add shortlist buttons to report lists.
This includes adding/removing reports from a user's shortlist, and
manual reordering of a shortlist with up/down buttons.
The backend code can cope with an item moving to any point in the list.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/User.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/User.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/DB/Result/User.pm b/perllib/FixMyStreet/DB/Result/User.pm index 72acb6940..b34be674a 100644 --- a/perllib/FixMyStreet/DB/Result/User.pm +++ b/perllib/FixMyStreet/DB/Result/User.pm @@ -379,6 +379,8 @@ around add_to_planned_reports => sub { around remove_from_planned_reports => sub { my ($orig, $self, $report) = @_; $self->user_planned_reports->active->for_report($report->id)->remove(); + $report->unset_extra_metadata('order'); + $report->update; }; sub active_planned_reports { |