[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. 6b482e02dc50b30d907a21c10b16105d5a31a9d7

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, rel_2_5 has been updated
       via  6b482e02dc50b30d907a21c10b16105d5a31a9d7 (commit)
       via  9da789186d8cc274a1fd73c7f51cd5fd3edd5c52 (commit)
      from  d1daf577b9970224110d9b191b6c0c8c8f6a2977 (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 6b482e02dc50b30d907a21c10b16105d5a31a9d7
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 9da789186d8cc274a1fd73c7f51cd5fd3edd5c52
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