lp1208875 make _get_circ_history_csv work with fetch_user_circ_history
authorJason Etheridge <jason@equinoxinitiative.org>
Fri, 2 Jun 2017 06:08:26 +0000 (02:08 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 27 Jun 2017 13:52:42 +0000 (09:52 -0400)
braindead adaptation.. _get_circ_history_csv predates fetch_usre_circ_history

I haven't scrutinized what the two circ_history subs actually do, but I bet
there's room for improvement here.

However, as it is now we do get a significant speed boost.  Thanks Dyrcona!

Signed-off-by: Jason Etheridge <jason@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jason Stephenson <jason@sigio.com>

Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm

index abdbf5c..947f183 100644 (file)
@@ -2719,7 +2719,7 @@ sub load_myopac_circ_history_export {
     my $circs = $self->fetch_user_circ_history;
 
     $self->ctx->{csv}->{rows} = $self->_get_circ_history_csv(
-        [map {$_->{id}} @$ids]
+        [map {$_->source_circ} @$circs]
     );
 
     return $self->set_file_download_headers($filename, 'text/csv; encoding=UTF-8');