Bugzilla – Attachment 42720 Details for
Bug 14368
Add discharges history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14368 [Follow-up]: Fix workflow.
Bug-14368-Follow-up-Fix-workflow.patch (text/plain), 2.25 KB, created by
Matthias Meusburger
on 2015-09-21 12:53:28 UTC
(
hide
)
Description:
Bug 14368 [Follow-up]: Fix workflow.
Filename:
MIME Type:
Creator:
Matthias Meusburger
Created:
2015-09-21 12:53:28 UTC
Size:
2.25 KB
patch
obsolete
>From 83d08f1d4684cb7af106966ed8678793be7fad18 Mon Sep 17 00:00:00 2001 >From: Matthias Meusburger <matthias.meusburger@biblibre.com> >Date: Mon, 21 Sep 2015 14:52:03 +0200 >Subject: [PATCH] Bug 14368 [Follow-up]: Fix workflow. > >--- > members/discharge.pl | 3 +-- > t/db_dependent/Borrower_Discharge.t | 8 +++++++- > 2 files changed, 8 insertions(+), 3 deletions(-) > >diff --git a/members/discharge.pl b/members/discharge.pl >index d1a021d..ad8408b 100755 >--- a/members/discharge.pl >+++ b/members/discharge.pl >@@ -67,9 +67,8 @@ if ( $input->param('borrowernumber') ) { > > # Generating discharge if needed > if ( $input->param('discharge') and $can_be_discharged ) { >- my $is_discharged = Koha::Borrower::Discharge::count({ >+ my $is_discharged = Koha::Borrower::Discharge::is_discharged({ > borrowernumber => $borrowernumber, >- validated => 1, > }); > unless ($is_discharged) { > Koha::Borrower::Discharge::discharge({ >diff --git a/t/db_dependent/Borrower_Discharge.t b/t/db_dependent/Borrower_Discharge.t >index 77a6040..8e8651b 100644 >--- a/t/db_dependent/Borrower_Discharge.t >+++ b/t/db_dependent/Borrower_Discharge.t >@@ -1,7 +1,7 @@ > #!/usr/bin/perl; > > use Modern::Perl; >-use Test::More tests => 15; >+use Test::More tests => 17; > use Test::Warn; > use MARC::Record; > >@@ -73,6 +73,12 @@ Koha::Borrower::Debarments::DelUniqueDebarment( { 'borrowernumber' => $borrower- > ok( !Koha::Borrower::Debarments::IsDebarred( $borrower->{borrowernumber} ), 'The debarment has been lifted' ); > ok( !Koha::Borrower::Discharge::is_discharged( { borrowernumber => $borrower->{borrowernumber} } ), 'The patron is not discharged after the restriction has been lifted' ); > >+# Verify that the discharge works multiple times >+Koha::Borrower::Discharge::request({ borrowernumber => $borrower->{borrowernumber} }); >+is(scalar( @{ Koha::Borrower::Discharge::get_pendings() }), 1, 'There is a pending discharge request (second time)'); >+Koha::Borrower::Discharge::discharge( { borrowernumber => $borrower->{borrowernumber} } ); >+is_deeply( Koha::Borrower::Discharge::get_pendings(), [], 'There is no pending discharge request (second time)'); >+ > # Check if PDF::FromHTML is installed. > my $check = eval { require PDF::FromHTML; }; > >-- >1.7.10.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 14368
:
40079
|
40171
|
40508
|
40512
|
42593
|
42598
|
42640
|
42670
|
42671
|
42672
|
42673
|
42720
|
42723
|
42930