diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Dashboard.pm | 2 | ||||
-rw-r--r-- | t/app/controller/dashboard.t | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm index 867d0659b..f961660c0 100644 --- a/perllib/FixMyStreet/App/Controller/Dashboard.pm +++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm @@ -181,7 +181,7 @@ sub export_as_csv { my ($self, $c, $problems_rs, $body) = @_; require Text::CSV; my $problems = $problems_rs->search( - {}, { prefetch => 'comments' }); + {}, { prefetch => 'comments', order_by => 'me.confirmed' }); my $filename = do { my %where = ( diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t index 5c0e19070..457eceade 100644 --- a/t/app/controller/dashboard.t +++ b/t/app/controller/dashboard.t @@ -531,12 +531,12 @@ FixMyStreet::override_config { desc => 'Selecting no state does nothing', p1 => { state => 'fixed - user', - conf_dt => DateTime->now(), + conf_dt => DateTime->now()->subtract( minutes => 1 ), category => 'Potholes', }, p2 => { state => 'confirmed', - conf_dt => DateTime->now(), + conf_dt => DateTime->now()->subtract( minutes => 1 ), category => 'Litter', }, state => '', @@ -553,12 +553,12 @@ FixMyStreet::override_config { desc => 'All fixed states count as fixed', p1 => { state => 'fixed - council', - conf_dt => DateTime->now(), + conf_dt => DateTime->now()->subtract( minutes => 1 ), category => 'Potholes', }, p2 => { state => 'fixed', - conf_dt => DateTime->now(), + conf_dt => DateTime->now()->subtract( minutes => 1 ), category => 'Potholes', }, state => 'fixed', |