[open-ils-commits] r8912 -
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 7 18:45:56 EST 2008
Author: erickson
Date: 2008-03-07 18:13:15 -0500 (Fri, 07 Mar 2008)
New Revision: 8912
Modified:
branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm
Log:
initial checkouts-by-circ-mod plugin. needs testing
Modified: branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm
===================================================================
--- branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm 2008-03-07 22:34:51 UTC (rev 8911)
+++ branches/rel_1_2/Open-ILS/src/perlmods/OpenILS/Application/Circ/ScriptBuilder.pm 2008-03-07 23:13:15 UTC (rev 8912)
@@ -390,6 +390,20 @@
return $val;
}
);
+
+ $runner->insert(__OILS_FUNC_userCircsByCircmod =>
+ sub {
+ my( $write_key, $userid ) = @_;
+ $logger->error("script_runner: here");
+ my $mods = $e->search_action_open_circ_count_by_circ_mod({usr=>$userid});
+ my $breakdown = {};
+ $breakdown->{$_->circ_modifier} = $_->count for @$mods;
+ use OpenSRF::Utils::JSON;
+ $logger->info("script_runner: Loaded checkouts by circ_modifier breakdown:".
+ OpenSRF::Utils::JSON->perl2JSON($breakdown));
+ $runner->insert($write_key, $breakdown, 1) if (keys %$breakdown);
+ }
+ );
}
More information about the open-ils-commits
mailing list