[open-ils-commits] [GIT] Evergreen ILS branch master updated. a2a6225fdc1d0e389c7b39aeeca9229d71e5bbf8
Evergreen Git
git at git.evergreen-ils.org
Mon Nov 26 13:48:46 EST 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via a2a6225fdc1d0e389c7b39aeeca9229d71e5bbf8 (commit)
via 13236a0af07ee4b56d5fdaf33105537a1d692b4e (commit)
from 968e6f8b6057fd619f65dda3dd680effb9c2eaac (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a2a6225fdc1d0e389c7b39aeeca9229d71e5bbf8
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Thu Nov 8 15:09:09 2012 -0500
Fix lp1076379: Can't edit holds beyond first page.
When a hold was being edited on page 2+ of a patron's list of holds, the
offset was > 0. Since the input hold_ids array ref has only 1 member, using
the offset as a starting point in searching began the search beyond the end
of the array and thus returned nothing.
The code in this commit moves the handling of the offset and limit to cases
where the input hold_ids is undefined, as this is, I think the intended
behavior. Typically when hold_ids is passed to the fetch_user_holds function
in EGCatLoader::Account, you want to retrieve those holds regardless of
the offset and limit values.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
index 33fec7f..337ee52 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
@@ -447,6 +447,7 @@ sub fetch_user_holds {
my $offset = shift;
my $e = $self->editor;
+ my $all_ids; # to be used below.
if(!$hold_ids) {
my $circ = OpenSRF::AppSession->create('open-ils.circ');
@@ -458,10 +459,13 @@ sub fetch_user_holds {
$available
)->gather(1);
$circ->kill_me;
- }
- my $all_ids = $hold_ids;
- $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
+ $all_ids = $hold_ids;
+ $hold_ids = [ grep { defined $_ } @$hold_ids[$offset..($offset + $limit - 1)] ] if $limit or $offset;
+
+ } else {
+ $all_ids = $hold_ids;
+ }
return { ids => $hold_ids, all_ids => $all_ids } if $ids_only or @$hold_ids == 0;
commit 13236a0af07ee4b56d5fdaf33105537a1d692b4e
Author: Jason Stephenson <jstephenson at mvlc.org>
Date: Thu Nov 8 11:32:06 2012 -0500
Repair syntax on line 559 of Holds.pm
A change was introduced when listing available holds that has incorrect JSON
syntax. This caused available holds not to be returned by the query.
Changing '+ahr' to '=' in the query resolves this.
Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
Signed-off-by: Ben Shum <bshum at biblio.org>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
index be54c68..1a647c9 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm
@@ -556,7 +556,7 @@ sub retrieve_holds {
if($available) {
$holds_query->{where}->{shelf_time} = {'!=' => undef};
# Maybe?
- $holds_query->{where}->{pickup_lib} = {'+ahr' => 'current_shelf_lib'};
+ $holds_query->{where}->{pickup_lib} = {'=' => 'current_shelf_lib'};
}
}
-----------------------------------------------------------------------
Summary of changes:
.../perlmods/lib/OpenILS/Application/Circ/Holds.pm | 2 +-
.../lib/OpenILS/WWW/EGCatLoader/Account.pm | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list