Bugzilla – Attachment 47972 Details for
Bug 15479
SIPserver rejects renewals for patrons with alphanumeric cardnumbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15479 [QA Followup] - Tidy sub to remove tabs causing qa script to fail
Bug-15479-QA-Followup---Tidy-sub-to-remove-tabs-ca.patch (text/plain), 3.70 KB, created by
Kyle M Hall (khall)
on 2016-02-12 13:09:06 UTC
(
hide
)
Description:
Bug 15479 [QA Followup] - Tidy sub to remove tabs causing qa script to fail
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-02-12 13:09:06 UTC
Size:
3.70 KB
patch
obsolete
>From 043f17ac6a603b20d1ccaccf0378cfb5e93a6d6b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 11 Feb 2016 04:29:55 +0000 >Subject: [PATCH] Bug 15479 [QA Followup] - Tidy sub to remove tabs causing qa > script to fail > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/SIP/ILS.pm | 77 +++++++++++++++++++++++++++++++++-------------------------- > 1 file changed, 43 insertions(+), 34 deletions(-) > >diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm >index 26cd411..7a40777 100644 >--- a/C4/SIP/ILS.pm >+++ b/C4/SIP/ILS.pm >@@ -126,48 +126,57 @@ sub offline_ok { > # the response. > # > sub checkout { >- my ($self, $patron_id, $item_id, $sc_renew, $fee_ack) = @_; >- my ($patron, $item, $circ); >+ my ( $self, $patron_id, $item_id, $sc_renew, $fee_ack ) = @_; >+ my ( $patron, $item, $circ ); > > $circ = C4::SIP::ILS::Transaction::Checkout->new(); >+ > # BEGIN TRANSACTION >- $circ->patron($patron = C4::SIP::ILS::Patron->new( $patron_id)); >- $circ->item($item = C4::SIP::ILS::Item->new( $item_id)); >+ $circ->patron( $patron = C4::SIP::ILS::Patron->new($patron_id) ); >+ $circ->item( $item = C4::SIP::ILS::Item->new($item_id) ); > if ($fee_ack) { > $circ->fee_ack($fee_ack); > } > >- if (!$patron) { >- $circ->screen_msg("Invalid Patron"); >- } elsif (!$patron->charge_ok) { >- $circ->screen_msg("Patron Blocked"); >- } elsif (!$item) { >- $circ->screen_msg("Invalid Item"); >- # holds checked inside do_checkout >- # } elsif ($item->hold_queue && @{$item->hold_queue} && ! $item->barcode_is_borrowernumber($patron_id, $item->hold_queue->[0]->{borrowernumber})) { >- # $circ->screen_msg("Item on Hold for Another User"); >- } elsif ($item->{patron} && !_ci_cardnumber_cmp($item->{patron},$patron_id)) { >- $circ->screen_msg("Item checked out to another patron"); >- } else { >- $circ->do_checkout(); >- if ($circ->ok){ >- $debug and warn "circ is ok"; >- # If the item is already associated with this patron, then >- # we're renewing it. >- $circ->renew_ok($item->{patron} && _ci_cardnumber_cmp($item->{patron}, $patron_id)); >- >- $item->{patron} = $patron_id; >- $item->{due_date} = $circ->{due}; >- push(@{$patron->{items}}, $item_id); >- $circ->desensitize(!$item->magnetic_media); >- >- syslog("LOG_DEBUG", "ILS::Checkout: patron %s has checked out %s", >- $patron_id, join(', ', @{$patron->{items}})); >- } >- else { >- syslog("LOG_ERR", "ILS::Checkout Issue failed"); >- } >+ if ( !$patron ) { >+ $circ->screen_msg("Invalid Patron"); >+ } >+ elsif ( !$patron->charge_ok ) { >+ $circ->screen_msg("Patron Blocked"); >+ } >+ elsif ( !$item ) { >+ $circ->screen_msg("Invalid Item"); > } >+ elsif ( $item->{patron} >+ && !_ci_cardnumber_cmp( $item->{patron}, $patron_id ) ) >+ { >+ $circ->screen_msg("Item checked out to another patron"); >+ } >+ else { >+ $circ->do_checkout(); >+ if ( $circ->ok ) { >+ $debug and warn "circ is ok"; >+ >+ # If the item is already associated with this patron, then >+ # we're renewing it. >+ $circ->renew_ok( $item->{patron} >+ && _ci_cardnumber_cmp( $item->{patron}, $patron_id ) ); >+ >+ $item->{patron} = $patron_id; >+ $item->{due_date} = $circ->{due}; >+ push( @{ $patron->{items} }, $item_id ); >+ $circ->desensitize( !$item->magnetic_media ); >+ >+ syslog( >+ "LOG_DEBUG", "ILS::Checkout: patron %s has checked out %s", >+ $patron_id, join( ', ', @{ $patron->{items} } ) >+ ); >+ } >+ else { >+ syslog( "LOG_ERR", "ILS::Checkout Issue failed" ); >+ } >+ } >+ > # END TRANSACTION > > return $circ; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15479
:
46326
|
47105
|
47811
|
47812
|
47969
|
47970
| 47972