Bugzilla – Attachment 104804 Details for
Bug 24612
expirationdate blank if patron has more than one item from bib on hold
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24612: Add tests
Bug-24612-Add-tests.patch (text/plain), 3.97 KB, created by
Victor Grousset/tuxayo
on 2020-05-13 04:14:59 UTC
(
hide
)
Description:
Bug 24612: Add tests
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2020-05-13 04:14:59 UTC
Size:
3.97 KB
patch
obsolete
>From 2f0fc687af1422d9af9c6a00f287ff29a7dcc7d9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 13 Apr 2020 13:10:55 +0200 >Subject: [PATCH] Bug 24612: Add tests > >ReserveSlip call need to be adjusted in test. >We also add a new reserve (same biblio, same patron) to highlight the problem. > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >--- > t/db_dependent/Letters/TemplateToolkit.t | 26 ++++++++++++++++-------- > 1 file changed, 17 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t >index 6f55a8a93e..720b9d104d 100644 >--- a/t/db_dependent/Letters/TemplateToolkit.t >+++ b/t/db_dependent/Letters/TemplateToolkit.t >@@ -522,17 +522,25 @@ You have [% count %] items due > > my $code = 'HOLD_SLIP'; > >- C4::Reserves::AddReserve( >+ my $reserve_id1 = C4::Reserves::AddReserve( > { > branchcode => $library->{branchcode}, > borrowernumber => $patron->{borrowernumber}, > biblionumber => $biblio1->{biblionumber}, > notes => "a note", > itemnumber => $item1->{itemnumber}, >- found => 'W' > } > ); >- C4::Reserves::AddReserve( >+ my $reserve_id2 = C4::Reserves::AddReserve( >+ { >+ branchcode => $library->{branchcode}, >+ borrowernumber => $patron->{borrowernumber}, >+ biblionumber => $biblio1->{biblionumber}, >+ notes => "a note", >+ itemnumber => $item1->{itemnumber}, >+ } >+ ); >+ my $reserve_id3 = C4::Reserves::AddReserve( > { > branchcode => $library->{branchcode}, > borrowernumber => $patron->{borrowernumber}, >@@ -568,13 +576,13 @@ You have [% count %] items due > <li><<reserves.waitingdate>></li> > </ul> > <p>Notes: >-<pre><<reserves.reservenotes>></pre> >+<pre><<reserves.reserve_id>>=<<reserves.reservenotes>></pre> > </p> > EOF > > reset_template( { template => $template, code => $code, module => 'circulation' } ); >- my $letter_for_item1 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, borrowernumber => $patron->{borrowernumber}, biblionumber => $biblio1->{biblionumber} } ); >- my $letter_for_item2 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, borrowernumber => $patron->{borrowernumber}, biblionumber => $biblio2->{biblionumber} } ); >+ my $letter_for_item1 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, reserve_id => $reserve_id1 } ); >+ my $letter_for_item2 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, reserve_id => $reserve_id3 } ); > > my $tt_template = <<EOF; > <h5>Date: [% today | \$KohaDates with_hours => 1 %]</h5> >@@ -602,13 +610,13 @@ EOF > <li>[% hold.waitingdate | \$KohaDates %]</li> > </ul> > <p>Notes: >-<pre>[% hold.reservenotes %]</pre> >+<pre>[% hold.reserve_id %]=[% hold.reservenotes %]</pre> > </p> > EOF > > reset_template( { template => $tt_template, code => $code, module => 'circulation' } ); >- my $tt_letter_for_item1 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, borrowernumber => $patron->{borrowernumber}, biblionumber => $biblio1->{biblionumber} } ); >- my $tt_letter_for_item2 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, borrowernumber => $patron->{borrowernumber}, biblionumber => $biblio2->{biblionumber} } ); >+ my $tt_letter_for_item1 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, reserve_id => $reserve_id1 } ); >+ my $tt_letter_for_item2 = C4::Reserves::ReserveSlip( { branchcode => $library->{branchcode}, reserve_id => $reserve_id3 } ); > > is( $tt_letter_for_item1->{content}, $letter_for_item1->{content}, ); > is( $tt_letter_for_item2->{content}, $letter_for_item2->{content}, ); >-- >2.26.2
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 24612
:
98738
|
98739
|
102818
|
102819
|
102820
|
104803
|
104804
|
104805
|
105202
|
105203
|
105204
|
105253
|
105254
|
105775