[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. 2f27b78cf93e33b784f50f0c4ea5d71583532da7

Evergreen Git git at git.evergreen-ils.org
Tue May 20 12:00:15 EDT 2014


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  2f27b78cf93e33b784f50f0c4ea5d71583532da7 (commit)
       via  9ce8743646d30396dc6090f98be618d8bbec25f3 (commit)
      from  148449c8c574461635009eb25687a08b1692da95 (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 2f27b78cf93e33b784f50f0c4ea5d71583532da7
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Tue May 20 08:46:47 2014 -0700

    LP#1296937: (follow-up) make $ids_only be the last parameter for ->charged_items()
    
    This change ensures that if a site fails to upgrade SIPServer at the
    same time that they upgrade Evergreen, the renew all message won't
    break on them.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
index e1a4b9e..7e998f8 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
@@ -461,7 +461,7 @@ sub hold_items {
 
 
     # all of my open holds
-    my $holds = $self->{editor}->search_action_hold_request({ 
+    my $holds = $self->{editor}->search_action_hold_request({
         usr => $self->{user}->id, 
         fulfillment_time => undef, 
         cancel_time => undef 
@@ -741,7 +741,7 @@ sub __circ_to_title {
 
 # force_bc -- return barcode data regardless of msg64_summary_datatype
 sub charged_items {
-    my ($self, $start, $end, $ids_only, $force_bc) = shift;
+    my ($self, $start, $end, $force_bc, $ids_only) = shift;
 
     $self->__patron_items_info();
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
index 5b199b2..675d6ad 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
@@ -31,7 +31,7 @@ sub do_renew_all {
     my $self = shift;
     my $sip = shift;
 
-    my $barcodes = $self->patron->charged_items(undef, undef, 0, 1);
+    my $barcodes = $self->patron->charged_items(undef, undef, 1);
 
     syslog('LOG_INFO', "OILS: RenewalAll for user ".
         $self->patron->{id} ." and items [@$barcodes]");

commit 9ce8743646d30396dc6090f98be618d8bbec25f3
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Thu Jan 23 12:07:06 2014 -0500

    LP#1296937: (SIP2) Add ids_only parameter to _items functions
    
    This allows the caller to skip loading of barcodes and/or titles when
    they are not needed, such as when the plan is to return counts, not
    details.  Per bug 1321017, this is particular useful for patrons
    that have metarecord holds.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
index 4ed79c7..e1a4b9e 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm
@@ -456,21 +456,23 @@ sub too_many_billed {
 # List of outstanding holds placed
 #
 sub hold_items {
-    my ($self, $start, $end) = @_;
+    my ($self, $start, $end, $ids_only) = @_;
     syslog('LOG_DEBUG', 'OILS: Patron->hold_items()');
 
-     # all of my open holds
-     my $holds = $self->{editor}->search_action_hold_request({ 
+
+    # all of my open holds
+    my $holds = $self->{editor}->search_action_hold_request({ 
         usr => $self->{user}->id, 
         fulfillment_time => undef, 
         cancel_time => undef 
     });
 
-     return $self->__format_holds($holds, $start, $end);
+    return $holds if $ids_only;
+    return $self->__format_holds($holds, $start, $end);
 }
 
 sub unavail_holds {
-     my ($self, $start, $end) = @_;
+     my ($self, $start, $end, $ids_only) = @_;
      syslog('LOG_DEBUG', 'OILS: Patron->unavail_holds()');
 
      my $holds = $self->{editor}->search_action_hold_request({
@@ -483,6 +485,7 @@ sub unavail_holds {
         ]
     });
 
+    return $holds if $ids_only;
     return $self->__format_holds($holds, $start, $end);
 }
 
@@ -693,12 +696,14 @@ sub __patron_items_info {
 
 
 sub overdue_items {
-    my ($self, $start, $end) = @_;
+    my ($self, $start, $end, $ids_only) = @_;
 
     $self->__patron_items_info();
     my @overdues = @{$self->{item_info}->{overdue}};
     #$overdues[$_] = __circ_to_title($self->{editor}, $overdues[$_]) for @overdues;
 
+    return \@overdues if $ids_only;
+
     my @o;
     syslog('LOG_DEBUG', "OILS: overdue_items() fleshing circs @overdues");
 
@@ -736,7 +741,7 @@ sub __circ_to_title {
 
 # force_bc -- return barcode data regardless of msg64_summary_datatype
 sub charged_items {
-    my ($self, $start, $end, $force_bc) = shift;
+    my ($self, $start, $end, $ids_only, $force_bc) = shift;
 
     $self->__patron_items_info();
 
@@ -747,6 +752,8 @@ sub charged_items {
 
     #$charges[$_] = __circ_to_title($self->{editor}, $charges[$_]) for @charges;
 
+    return \@charges if $ids_only;
+
     my @c;
     syslog('LOG_DEBUG', "OILS: charged_items() fleshing circs @charges");
 
@@ -769,11 +776,15 @@ sub charged_items {
 }
 
 sub fine_items {
-    my ($self, $start, $end) = @_;
+    my ($self, $start, $end, $ids_only) = @_;
     my @fines;
     eval {
        my $xacts = $U->simplereq('open-ils.actor', 'open-ils.actor.user.transactions.history.have_balance', $self->{authtoken}, $self->{user}->id);
        foreach my $xact (@{$xacts}) {
+           if ($ids_only) {
+               push @fines, $xact;
+               next;
+           }
            my $line = $xact->balance_owed . " " . $xact->last_billing_type . " ";
            if ($xact->xact_type eq 'circulation') {
                my $mods = $U->simplereq('open-ils.circ', 'open-ils.circ.circ_transaction.find_title', $self->{authtoken}, $xact->id);
@@ -792,7 +803,7 @@ sub fine_items {
 
 # not currently supported
 sub recall_items {
-    my ($self, $start, $end) = @_;
+    my ($self, $start, $end, $ids_only) = @_;
     return [];
 }
 
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
index 675d6ad..5b199b2 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/SIP/Transaction/RenewAll.pm
@@ -31,7 +31,7 @@ sub do_renew_all {
     my $self = shift;
     my $sip = shift;
 
-    my $barcodes = $self->patron->charged_items(undef, undef, 1);
+    my $barcodes = $self->patron->charged_items(undef, undef, 0, 1);
 
     syslog('LOG_INFO', "OILS: RenewalAll for user ".
         $self->patron->{id} ." and items [@$barcodes]");

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/SIP/Patron.pm |   29 +++++++++++++++-------
 1 files changed, 20 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list