[open-ils-commits] r16977 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Jul 19 10:06:36 EDT 2010
Author: erickson
Date: 2010-07-19 10:06:34 -0400 (Mon, 19 Jul 2010)
New Revision: 16977
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
when calculating estimed hold wait time, don't ignore copies that have no circ modifier
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-07-19 14:00:41 UTC (rev 16976)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm 2010-07-19 14:06:34 UTC (rev 16977)
@@ -1094,6 +1094,20 @@
where => {'+ahcm' => {hold => $hold->id}}
});
+
+ # take into account copies that have no circ modifier
+ my $no_circ_mods = $e->json_query({
+ select => {
+ acp => [
+ {column => 'id', transform => 'count', aggregate => 1, alias => 'count'}
+ ]
+ },
+ from => {ahcm => 'acp'},
+ where => {'+ahcm' => {hold => $hold->id}, '+acp' => {circ_modifier => undef}}
+ })->[0];
+
+ push(@$hold_data, {count => $no_circ_mods->{count}}) if $no_circ_mods;
+
my $user_org = $e->json_query({select => {au => ['home_ou']}, from => 'au', where => {id => $hold->usr}})->[0]->{home_ou};
my $default_wait = $U->ou_ancestor_setting_value($user_org, OILS_SETTING_HOLD_ESIMATE_WAIT_INTERVAL);
More information about the open-ils-commits
mailing list