Bugzilla – Attachment 21530 Details for
Bug 10949
hold request not retrieved when printing hold slip
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 10949: restore ability to successfully print hold slips
PASSED-QA-Bug-10949-restore-ability-to-successfull.patch (text/plain), 2.62 KB, created by
Katrin Fischer
on 2013-09-27 21:34:24 UTC
(
hide
)
Description:
[PASSED QA] Bug 10949: restore ability to successfully print hold slips
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-09-27 21:34:24 UTC
Size:
2.62 KB
patch
obsolete
>From 2704a7bd49557fa2b92c326de0857407b36481ba Mon Sep 17 00:00:00 2001 >From: Galen Charlton <gmc@esilibrary.com> >Date: Wed, 25 Sep 2013 16:15:07 +0000 >Subject: [PATCH] [PASSED QA] Bug 10949: restore ability to successfully print > hold slips > >This fixes a regression introduced by the patch for bug >9394 -- when printing a hold slip using the 'print and confirm' >button, the slip would contain only the text 'reserve not found', >not a full hold slip. > >This patch also adds a regression test. > >To test: > >[1] Check in an item that would fill a hold. Use the 'print > and confirm button' to confirm the hold. >[2] The printout will only contain text to the effect of > 'reserve not found'. >[3] Apply the patch. >[4] Repeat step 1. This time, a full hold slip should be printed. >[5] Verify that prove -v t/db_dependent/Reserves.t passes. > >Signed-off-by: Galen Charlton <gmc@esilibrary.com> >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Pass all tests, new and old, and QA script. >Verified wrong and corrected behaviour. > >Note: Sometimes there will not be the message 'reserve not found' >showing up, but hold information for a different record. This happens >when there exists a reserve_id with the borrowernumber of the patron >in question in your database. >--- > C4/Reserves.pm | 7 +++++-- > t/db_dependent/Reserves.t | 5 ++++- > 2 files changed, 9 insertions(+), 3 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 78e9a5b..bba4933 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -2171,8 +2171,11 @@ sub ReserveSlip { > > # return unless ( C4::Context->boolean_preference('printreserveslips') ); > >- my $reserve = GetReserveInfo($borrowernumber,$biblionumber ) >- or return; >+ my $reserve_id = GetReserveId({ >+ biblionumber => $biblionumber, >+ borrowernumber => $borrowernumber >+ }) or return; >+ my $reserve = GetReserveInfo($reserve_id) or return; > > return C4::Letters::GetPreparedLetter ( > module => 'circulation', >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index ea60d54..ad50619 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -2,7 +2,7 @@ > > use Modern::Perl; > >-use Test::More tests => 16; >+use Test::More tests => 17; > use MARC::Record; > use DateTime::Duration; > >@@ -263,4 +263,7 @@ is(exists $messages->{ResFound}?1:0, 1, 'AddReturn considers future reserve with > > # End of tests for bug 9761 (ConfirmFutureHolds) > >+my $letter = ReserveSlip('CPL', $requesters{'CPL'}, $bibnum); >+ok(defined($letter), 'can successfully generate hold slip (bug 10949)'); >+ > $dbh->rollback; >-- >1.7.9.5
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 10949
:
21451
|
21453
| 21530