View | Details | Raw Unified | Return to bug 20644
Collapse All | Expand All

(-)a/C4/Circulation.pm (-3 / +2 lines)
Lines 1058-1066 sub CanBookBeIssued { Link Here
1058
    #
1058
    #
1059
    # CHECKPREVCHECKOUT: CHECK IF ITEM HAS EVER BEEN LENT TO PATRON
1059
    # CHECKPREVCHECKOUT: CHECK IF ITEM HAS EVER BEEN LENT TO PATRON
1060
    #
1060
    #
1061
    $patron = Koha::Patrons->find( $patron->borrowernumber )
1061
    $patron = Koha::Patrons->find( $patron->borrowernumber );    # FIXME Refetch just in case, to avoid regressions. But must not be needed
1062
        ;    # FIXME Refetch just in case, to avoid regressions. But must not be needed
1062
    if ( $patron->wants_check_for_previous_checkout($item_object) && $patron->do_check_for_previous_checkout($item_unblessed) ) {
1063
    if ( $patron->wants_check_for_previous_checkout && $patron->do_check_for_previous_checkout($item_unblessed) ) {
1064
        $needsconfirmation{PREVISSUE} = 1;
1063
        $needsconfirmation{PREVISSUE} = 1;
1065
    }
1064
    }
1066
1065
(-)a/Koha/Patron.pm (-8 / +13 lines)
Lines 46-51 use Koha::Encryption; Link Here
46
use Koha::Exceptions;
46
use Koha::Exceptions;
47
use Koha::Exceptions::Password;
47
use Koha::Exceptions::Password;
48
use Koha::Holds;
48
use Koha::Holds;
49
use Koha::ItemTypes;
49
use Koha::Old::Checkouts;
50
use Koha::Old::Checkouts;
50
use Koha::OverdueRules;
51
use Koha::OverdueRules;
51
use Koha::Patron::Attributes;
52
use Koha::Patron::Attributes;
Lines 806-833 Return 1 if Koha needs to perform PrevIssue checking, else 0. Link Here
806
=cut
807
=cut
807
808
808
sub wants_check_for_previous_checkout {
809
sub wants_check_for_previous_checkout {
809
    my ($self) = @_;
810
    my ($self, $item) = @_;
810
    my $syspref = C4::Context->preference("checkPrevCheckout");
811
    my $syspref = C4::Context->preference("checkPrevCheckout");
811
812
812
    # Simple cases
813
    # Simple cases
813
    ## Hard syspref trumps all
814
    ## Hard syspref trumps all
814
    return 1 if ( $syspref eq 'hardyes' );
815
    return 1 if ( $syspref eq 'hardyes' );
815
    return 0 if ( $syspref eq 'hardno' );
816
    return 0 if ( $syspref eq 'hardno' );
816
    ## Now, patron pref trumps all
817
818
    # Now, item pref trumps all
819
    if ($item) {
820
        my $itype = Koha::ItemTypes->find( $item->effective_itemtype );
821
        return 1 if ( $itype->checkprevcheckout eq 'yes' );
822
        return 0 if ( $itype->checkprevcheckout eq 'no' );
823
    }
824
825
    # Now, item type inherits -> determine patron preference
817
    return 1 if ( $self->checkprevcheckout eq 'yes' );
826
    return 1 if ( $self->checkprevcheckout eq 'yes' );
818
    return 0 if ( $self->checkprevcheckout eq 'no' );
827
    return 0 if ( $self->checkprevcheckout eq 'no' );
819
828
820
    # More complex: patron inherits -> determine category preference
829
    # More complex: item type inherit and patron inherits -> determine category preference
821
    my $checkPrevCheckoutByCat = $self->category->checkprevcheckout;
830
    my $checkPrevCheckoutByCat = $self->category->checkprevcheckout;
822
    return 1 if ( $checkPrevCheckoutByCat eq 'yes' );
831
    return 1 if ( $checkPrevCheckoutByCat eq 'yes' );
823
    return 0 if ( $checkPrevCheckoutByCat eq 'no' );
832
    return 0 if ( $checkPrevCheckoutByCat eq 'no' );
824
833
825
    # Finally: category preference is inherit, default to 0
834
    # Finally: category preference is inherit, default to 0
826
    if ( $syspref eq 'softyes' ) {
835
    return $syspref eq 'softyes' ? 1 : 0;
827
        return 1;
828
    } else {
829
        return 0;
830
    }
831
}
836
}
832
837
833
=head3 do_check_for_previous_checkout
838
=head3 do_check_for_previous_checkout
(-)a/admin/itemtypes.pl (+4 lines)
Lines 99-104 if ( $op eq 'add_form' ) { Link Here
99
    my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0;
99
    my $rentalcharge_hourly_calendar = $input->param('rentalcharge_hourly_calendar') // 0;
100
    my $automatic_checkin            = $input->param('automatic_checkin')            // 0;
100
    my $automatic_checkin            = $input->param('automatic_checkin')            // 0;
101
    my $bookable                     = $input->param('bookable')                     // 0;
101
    my $bookable                     = $input->param('bookable')                     // 0;
102
    my $automatic_checkin = $input->param('automatic_checkin') // 0;
103
    my $checkprevcheckout            = $input->param('checkprevcheckout');
102
104
103
    if ( $itemtype and $is_a_modif ) {    # it's a modification
105
    if ( $itemtype and $is_a_modif ) {    # it's a modification
104
        $itemtype->description($description);
106
        $itemtype->description($description);
Lines 120-125 if ( $op eq 'add_form' ) { Link Here
120
        $itemtype->rentalcharge_hourly_calendar($rentalcharge_hourly_calendar);
122
        $itemtype->rentalcharge_hourly_calendar($rentalcharge_hourly_calendar);
121
        $itemtype->automatic_checkin($automatic_checkin);
123
        $itemtype->automatic_checkin($automatic_checkin);
122
        $itemtype->bookable($bookable);
124
        $itemtype->bookable($bookable);
125
        $itemtype->checkprevcheckout($checkprevcheckout);
123
126
124
        eval {
127
        eval {
125
            $itemtype->store;
128
            $itemtype->store;
Lines 154-159 if ( $op eq 'add_form' ) { Link Here
154
                rentalcharge_hourly_calendar => $rentalcharge_hourly_calendar,
157
                rentalcharge_hourly_calendar => $rentalcharge_hourly_calendar,
155
                automatic_checkin            => $automatic_checkin,
158
                automatic_checkin            => $automatic_checkin,
156
                bookable                     => $bookable,
159
                bookable                     => $bookable,
160
                checkprevcheckout            => $checkprevcheckout,
157
            }
161
            }
158
        );
162
        );
159
        eval {
163
        eval {
(-)a/installer/data/mysql/atomicupdate/bug_20644-add_checkprevcheckout_to_items.pl (+22 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => "20644",
5
    description => "Add the column checkprevcheckout to itemtypes table",
6
    up          => sub {
7
        my ($args) = @_;
8
        my ( $dbh, $out ) = @$args{qw(dbh out)};
9
10
        if( !column_exists( 'itemtypes', 'checkprevcheckout' ) ) {
11
            $dbh->do(
12
                q{
13
                ALTER TABLE itemtypes
14
                ADD IF NOT EXISTS checkprevcheckout varchar(7) NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for a patron if a item of this type has previously been checked out to the same patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.'
15
                AFTER automatic_checkin;
16
            }
17
            );
18
        }
19
20
        say $out "Added column 'itemtypes.checkprevcheckout'";
21
    },
22
};
(-)a/installer/data/mysql/kohastructure.sql (+1 lines)
Lines 4238-4243 CREATE TABLE `itemtypes` ( Link Here
4238
  `searchcategory` varchar(80) DEFAULT NULL COMMENT 'Group this item type with others with the same value on OPAC search options',
4238
  `searchcategory` varchar(80) DEFAULT NULL COMMENT 'Group this item type with others with the same value on OPAC search options',
4239
  `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If automatic checkin is enabled for items of this type',
4239
  `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If automatic checkin is enabled for items of this type',
4240
  `bookable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Activate bookable feature for items related to this item type',
4240
  `bookable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Activate bookable feature for items related to this item type',
4241
  `checkprevcheckout` varchar(7) NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for a patron if a item of this type has previously been checked out to the same patron if ''yes'', not if ''no'', defer to category setting if ''inherit''.',
4241
  PRIMARY KEY (`itemtype`),
4242
  PRIMARY KEY (`itemtype`),
4242
  UNIQUE KEY `itemtype` (`itemtype`),
4243
  UNIQUE KEY `itemtype` (`itemtype`),
4243
  KEY `itemtypes_ibfk_1` (`parent_type`),
4244
  KEY `itemtypes_ibfk_1` (`parent_type`),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/itemtypes.tt (-2 / +22 lines)
Lines 344-351 Link Here
344
                            [% END %]
344
                            [% END %]
345
                        </select>
345
                        </select>
346
                    </li>
346
                    </li>
347
                    <li
347
                    <li>
348
                        ><label for="branches">Library limitation: </label>
348
                        <label for="branches">Library limitation: </label>
349
                        <select id="branches" name="branches" multiple size="10">
349
                        <select id="branches" name="branches" multiple size="10">
350
                            <option value="">All libraries</option>
350
                            <option value="">All libraries</option>
351
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => itemtype.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
351
                            [% PROCESS options_for_libraries libraries => Branches.all( selected => itemtype.get_library_limits, unfiltered => 1, do_not_select_my_library => 1 ) %]
Lines 358-363 Link Here
358
                        <div class="hint">Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </div>
358
                        <div class="hint">Enter a summary that will overwrite the default one in search results lists. Example, for a website itemtype : </div>
359
                        <div class="hint"><strong>&lt;a href="[856u]"&gt;open site&lt;/a&gt;</strong> will show the link just below the title</div>
359
                        <div class="hint"><strong>&lt;a href="[856u]"&gt;open site&lt;/a&gt;</strong> will show the link just below the title</div>
360
                    </li>
360
                    </li>
361
                    [% IF Koha.Preference('CheckPrevCheckout') == 'softyes' || Koha.Preference('CheckPrevCheckout') == 'softno' %]
362
                        <li>
363
                            <label for="checkprevcheckout">Check for previous checkouts: </label>
364
                            <select name="checkprevcheckout" id="checkprevcheckout">
365
                                [% IF itemtype.checkprevcheckout == 'yes' %]
366
                                <option value="yes" selected="selected">Yes and override system preferences</option>
367
                                <option value="no">No and override system preferences</option>
368
                                <option value="inherit">Inherit from system preferences</option>
369
                                [% ELSIF itemtype.checkprevcheckout == 'no' %]
370
                                <option value="yes">Yes and override system preferences</option>
371
                                <option value="no" selected="selected">No and override system preferences</option>
372
                                <option value="inherit">Inherit from system preferences</option>
373
                                [% ELSE %]
374
                                <option value="yes">Yes and override system preferences</option>
375
                                <option value="no">No and override system preferences</option>
376
                                <option value="inherit" selected="selected">Inherit from system preferences</option>
377
                                [% END %]
378
                            </select>
379
                        </li>
380
                    [% END %]
361
                </ol>
381
                </ol>
362
            </fieldset>
382
            </fieldset>
363
383
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref (-2 / +2 lines)
Lines 5-12 Patrons: Link Here
5
           default: no
5
           default: no
6
           choices:
6
           choices:
7
               hardyes: "Do"
7
               hardyes: "Do"
8
               softyes: "Unless overridden by patron category, do"
8
               softyes: "Unless overridden by patron category or by item type, do"
9
               softno: "Unless overridden by patron category, do not"
9
               softno: "Unless overridden by patron category or by item type, do not"
10
               hardno: "Do not"
10
               hardno: "Do not"
11
         - " check borrower checkout history to see if the current item has been checked out before."
11
         - " check borrower checkout history to see if the current item has been checked out before."
12
     -
12
     -
(-)a/t/db_dependent/Koha/ItemTypes.t (-4 / +34 lines)
Lines 20-26 Link Here
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::NoWarnings;
22
use Test::NoWarnings;
23
use Test::More tests => 16;
23
use Test::More tests => 19;
24
24
25
use t::lib::Mocks;
25
use t::lib::Mocks;
26
use t::lib::TestBuilder;
26
use t::lib::TestBuilder;
Lines 41-48 my $database = Koha::Database->new(); Link Here
41
my $schema   = $database->schema();
41
my $schema   = $database->schema();
42
$schema->txn_begin;
42
$schema->txn_begin;
43
43
44
my $builder       = t::lib::TestBuilder->new;
44
my $builder        = t::lib::TestBuilder->new;
45
my $initial_count = Koha::ItemTypes->search->count;
45
my $initial_count1 = Koha::ItemTypes->search->count;
46
46
47
my $parent1 = $builder->build_object( { class => 'Koha::ItemTypes', value => { description => 'description' } } );
47
my $parent1 = $builder->build_object( { class => 'Koha::ItemTypes', value => { description => 'description' } } );
48
my $child1  = $builder->build_object(
48
my $child1  = $builder->build_object(
Lines 110-116 is_deeply( $type->unblessed, $child2->unblessed, "We got back the same object" ) Link Here
110
t::lib::Mocks::mock_preference( 'language',      'en' );
110
t::lib::Mocks::mock_preference( 'language',      'en' );
111
t::lib::Mocks::mock_preference( 'OPACLanguages', 'en' );
111
t::lib::Mocks::mock_preference( 'OPACLanguages', 'en' );
112
my $itemtypes = Koha::ItemTypes->search_with_localization;
112
my $itemtypes = Koha::ItemTypes->search_with_localization;
113
is( $itemtypes->count, $initial_count + 4, 'We added 4 item types' );
113
is( $itemtypes->count, $initial_count1 + 4, 'We added 4 item types' );
114
my $first_itemtype = $itemtypes->next;
114
my $first_itemtype = $itemtypes->next;
115
is(
115
is(
116
    $first_itemtype->translated_description,
116
    $first_itemtype->translated_description,
Lines 160-163 subtest 'image_location' => sub { Link Here
160
    );
160
    );
161
};
161
};
162
162
163
# test for checkprevcheckout
164
my $initial_count2 = Koha::ItemTypes->search->count;
165
166
my @itypes = (
167
    Koha::ItemType->new(
168
        {
169
            itemtype => 'ITYPE1',
170
        }
171
    )->store,
172
    Koha::ItemType->new(
173
        {
174
            itemtype          => 'ITYPE2',
175
            checkprevcheckout => undef,
176
        }
177
    )->store,
178
);
179
180
for my $itype (@itypes) {
181
    my $retrived_itype = Koha::ItemTypes->find( $itype->itemtype );
182
    is(
183
        $retrived_itype->checkprevcheckout, 'inherit',
184
        'Koha::ItemType->store should default checkprevcheckout to inherit'
185
    );
186
}
187
188
is(
189
    Koha::ItemTypes->search->count, $initial_count2 + 2,
190
    'We added two item types with checkprevcheckout set to inherit'
191
);
192
163
$schema->txn_rollback;
193
$schema->txn_rollback;
(-)a/t/db_dependent/Patron/Borrower_PrevCheckout.t (-2 / +125 lines)
Lines 8-14 use Koha::DateUtils qw( dt_from_string ); Link Here
8
use Koha::Patrons;
8
use Koha::Patrons;
9
9
10
use Test::NoWarnings;
10
use Test::NoWarnings;
11
use Test::More tests => 62;
11
use Test::More tests => 170;
12
12
13
use_ok('Koha::Patron');
13
use_ok('Koha::Patron');
14
14
Lines 49-54 my $inheritCatCode = $builder->build( Link Here
49
    }
49
    }
50
);
50
);
51
51
52
my $yesItypeCode = $builder->build_object({
53
    class => 'Koha::ItemTypes',
54
    value => {
55
        checkprevcheckout => 'yes',
56
    }
57
});
58
59
my $noItypeCode = $builder->build_object({
60
    class => 'Koha::ItemTypes',
61
    value  => {
62
        checkprevcheckout => 'no',
63
    }
64
});
65
66
my $inheritItypeCode = $builder->build_object({
67
    class => 'Koha::ItemTypes',
68
    value  => {
69
        checkprevcheckout => 'inherit',
70
    }
71
});
72
52
# Create context for some tests late on in the file.
73
# Create context for some tests late on in the file.
53
my $library = $builder->build( { source => 'Branch' } );
74
my $library = $builder->build( { source => 'Branch' } );
54
my $staff   = $builder->build( { source => 'Borrower' } );
75
my $staff   = $builder->build( { source => 'Borrower' } );
Lines 57-62 t::lib::Mocks::mock_userenv( { branchcode => $library->{branchcode} } ); Link Here
57
78
58
# wants_check_for_previous_checkout
79
# wants_check_for_previous_checkout
59
80
81
# We want to test the subroutine without passing the $item parameter
60
# We expect the following result matrix:
82
# We expect the following result matrix:
61
#
83
#
62
# (1/0 indicates the return value of WantsCheckPrevCheckout; i.e. 1 says we
84
# (1/0 indicates the return value of WantsCheckPrevCheckout; i.e. 1 says we
Lines 213-218 map { Link Here
213
    } @{ $_->{categories} };
235
    } @{ $_->{categories} };
214
} @{$mappings};
236
} @{$mappings};
215
237
238
239
# wants_check_for_previous_checkout
240
241
# We want to test the subroutine by passing the $item parameter
242
# We expect the following result matrix:
243
#
244
# (1/0 indicates the return value of WantsCheckPrevCheckout; i.e. 1 says we
245
# should check whether the item was previously issued)
246
#
247
# | System Preference | hardyes                                                                                                   |
248
# |-------------------+-----------------------------------------------------------------------------------------------------------|
249
# | Item Type Setting | yes                               | no                                | inherit                           |
250
# |-------------------+-----------------------------------+-----------------------------------+-----------------------------------|
251
# | Category Setting  | yes       | no        | inherit   | yes       | no        | inherit   | yes       | no        | inherit   |
252
# |-------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------|
253
# | Patron Setting    | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i |
254
# |-------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|
255
# | Expected Result   | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
256
#
257
#
258
# | System Preference | softyes                                                                                                   |
259
# |-------------------+-----------------------------------------------------------------------------------------------------------|
260
# | Item Type Setting | yes                               | no                                | inherit                           |
261
# |-------------------+-----------------------------------+-----------------------------------+-----------------------------------|
262
# | Category Setting  | yes       | no        | inherit   | yes       | no        | inherit   | yes       | no        | inherit   |
263
# |-------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------|
264
# | Patron Setting    | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i |
265
# |-------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|
266
# | Expected Result   | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 |
267
#
268
#
269
# | System Preference | softno                                                                                                    |
270
# |-------------------+-----------------------------------------------------------------------------------------------------------|
271
# | Item Type Setting | yes                               | no                                | inherit                           |
272
# |-------------------+-----------------------------------+-----------------------------------+-----------------------------------|
273
# | Category Setting  | yes       | no        | inherit   | yes       | no        | inherit   | yes       | no        | inherit   |
274
# |-------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------|
275
# | Patron Setting    | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i |
276
# |-------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|
277
# | Expected Result   | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
278
#
279
#
280
# | System Preference | hardno                                                                                                    |
281
# |-------------------+-----------------------------------------------------------------------------------------------------------|
282
# | Item Type Setting | yes                               | no                                | inherit                           |
283
# |-------------------+-----------------------------------+-----------------------------------+-----------------------------------|
284
# | Category Setting  | yes       | no        | inherit   | yes       | no        | inherit   | yes       | no        | inherit   |
285
# |-------------------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------|
286
# | Patron Setting    | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i | y | n | i |
287
# |-------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---|
288
# | Expected Result   | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
289
290
my $itypeCode = {
291
    'yes' => $yesItypeCode->itemtype,
292
    'no' => $noItypeCode->itemtype,
293
    'inherit' => $inheritItypeCode->itemtype,
294
};
295
296
foreach my $syspref ('hardyes','softyes','softno','hardno'){
297
    t::lib::Mocks::mock_preference( 'checkprevcheckout', $syspref );
298
    foreach my $itemtype_setting ('yes','no','inherit'){ #itemtype Setting
299
        my $item      = $builder->build_sample_item( { itype => $itypeCode->{$itemtype_setting} } );
300
        foreach my $categorie_settings('yes','no','inherit'){
301
            my $catCode = $categorie_settings . 'Cat';
302
            foreach my $patron_setting('yes','no','inherit'){
303
                my $result = undef;
304
                $result = 1 if($syspref eq 'hardyes');
305
                $result = 0 if($syspref eq 'hardno');
306
                $result = 1 if(!defined $result && $itemtype_setting eq 'yes');
307
                $result = 0 if(!defined $result && $itemtype_setting eq 'no');
308
                $result = 1 if(!defined $result && $patron_setting eq 'yes');
309
                $result = 0 if(!defined $result && $patron_setting eq 'no');
310
                $result = 1 if(!defined $result && $categorie_settings eq 'yes');
311
                $result = 0 if(!defined $result && $categorie_settings eq 'no');
312
                $result = 1 if(!defined $result && $syspref eq 'softyes');
313
                $result = 0 if(!defined $result && $syspref eq 'softno');
314
                my $kpatron = $builder->build(
315
                    {
316
                        source => 'Borrower',
317
                        value  => {
318
                            checkprevcheckout => $patron_setting,
319
                            categorycode      => $catCode,
320
                        },
321
                    }
322
                );
323
                my $patron = Koha::Patrons->find( $kpatron->{borrowernumber} );
324
                is(
325
                    $patron->wants_check_for_previous_checkout($item), $result,
326
                    "Predicate with syspref "
327
                        . $syspref
328
                        . ", cat "
329
                        . $catCode
330
                        . ", patron "
331
                        . $patron_setting
332
                        . ", item type "
333
                        . $itypeCode->{$itemtype_setting}
334
                );
335
            }
336
        }
337
    }
338
}
339
216
# do_check_for_previous_checkout
340
# do_check_for_previous_checkout
217
341
218
# We want to test:
342
# We want to test:
219
- 

Return to bug 20644