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

(-)a/C4/HoldsQueue.pm (-1 / +1 lines)
Lines 732-738 sub MapItemsToHoldRequests { Link Here
732
    my $num_items_remaining = scalar(@$available_items);
732
    my $num_items_remaining = scalar(@$available_items);
733
733
734
    # Look for Local Holds Priority matches first
734
    # Look for Local Holds Priority matches first
735
    if ( C4::Context->preference('LocalHoldsPriority') ) {
735
    if ( C4::Context->preference( 'LocalHoldsPriority' ne "None" ) ) {
736
        my $LocalHoldsPriorityPatronControl = C4::Context->preference('LocalHoldsPriorityPatronControl');
736
        my $LocalHoldsPriorityPatronControl = C4::Context->preference('LocalHoldsPriorityPatronControl');
737
        my $LocalHoldsPriorityItemControl   = C4::Context->preference('LocalHoldsPriorityItemControl');
737
        my $LocalHoldsPriorityItemControl   = C4::Context->preference('LocalHoldsPriorityItemControl');
738
738
(-)a/C4/Reserves.pm (-6 / +28 lines)
Lines 43-48 use Koha::Holds; Link Here
43
use Koha::ItemTypes;
43
use Koha::ItemTypes;
44
use Koha::Items;
44
use Koha::Items;
45
use Koha::Libraries;
45
use Koha::Libraries;
46
use Koha::Library;
46
use Koha::Patrons;
47
use Koha::Patrons;
47
use Koha::Plugins;
48
use Koha::Plugins;
48
use Koha::Policy::Holds;
49
use Koha::Policy::Holds;
Lines 897-904 sub CheckReserves { Link Here
897
            } else {
898
            } else {
898
                my $patron;
899
                my $patron;
899
                my $local_hold_match;
900
                my $local_hold_match;
900
901
                my $local_hold_group_match;
901
                if ($LocalHoldsPriority) {
902
                if ( $LocalHoldsPriority ne 'None' ) {
902
                    $patron = Koha::Patrons->find( $res->{borrowernumber} );
903
                    $patron = Koha::Patrons->find( $res->{borrowernumber} );
903
904
904
                    unless ( $item->exclude_from_local_holds_priority
905
                    unless ( $item->exclude_from_local_holds_priority
Lines 909-921 sub CheckReserves { Link Here
909
                              ( $LocalHoldsPriorityPatronControl eq 'PickupLibrary' ) ? $res->{branchcode}
910
                              ( $LocalHoldsPriorityPatronControl eq 'PickupLibrary' ) ? $res->{branchcode}
910
                            : ( $LocalHoldsPriorityPatronControl eq 'HomeLibrary' )   ? $patron->branchcode
911
                            : ( $LocalHoldsPriorityPatronControl eq 'HomeLibrary' )   ? $patron->branchcode
911
                            :                                                           undef;
912
                            :                                                           undef;
912
                        $local_hold_match =
913
                        if ( $LocalHoldsPriority eq 'GiveLibrary' || $LocalHoldsPriority eq 'GiveLibraryAndGroup' )
913
                            $local_holds_priority_item_branchcode eq $local_holds_priority_patron_branchcode;
914
                        {    #Check the library first
915
                            $local_hold_match =
916
                                $local_holds_priority_item_branchcode eq $local_holds_priority_patron_branchcode;
917
                            if ( !$local_hold_match && $LocalHoldsPriority eq ('GiveLibraryAndGroup') )
918
                            {    # If there's no match at the library level, check hold groups
919
                                $local_hold_group_match =
920
                                    Koha::Libraries->find( { branchcode => $local_holds_priority_item_branchcode } )
921
                                    ->validate_hold_sibling(
922
                                    { branchcode => $local_holds_priority_patron_branchcode } );
923
                            }
924
                        }
925
                        if ( $LocalHoldsPriority eq 'GiveLibraryGroup' ) {    #Check only the group
926
                            $local_hold_group_match =
927
                                Koha::Libraries->find( { branchcode => $local_holds_priority_item_branchcode } )
928
                                ->validate_hold_sibling( { branchcode => $local_holds_priority_patron_branchcode } );
929
                        }
914
                    }
930
                    }
915
                }
931
                }
916
932
917
                # See if this item is more important than what we've got so far
933
                # See if this item is more important than what we've got so far
918
                if ( ( $res->{'priority'} && $res->{'priority'} < $priority ) || $local_hold_match ) {
934
                if (   ( $res->{'priority'} && $res->{'priority'} < $priority )
935
                    || $local_hold_match
936
                    || $local_hold_group_match )
937
                {
919
                    next
938
                    next
920
                        if $res->{item_group_id}
939
                        if $res->{item_group_id}
921
                        && ( !$item->item_group || $item->item_group->id != $res->{item_group_id} );
940
                        && ( !$item->item_group || $item->item_group->id != $res->{item_group_id} );
Lines 944-950 sub CheckReserves { Link Here
944
                    next unless $item->can_be_transferred( { to => Koha::Libraries->find( $res->{branchcode} ) } );
963
                    next unless $item->can_be_transferred( { to => Koha::Libraries->find( $res->{branchcode} ) } );
945
                    $priority = $res->{'priority'};
964
                    $priority = $res->{'priority'};
946
                    $highest  = $res;
965
                    $highest  = $res;
947
                    last if $local_hold_match;
966
                    last
967
                        if $local_hold_match
968
                        || ( ( $LocalHoldsPriority eq 'GiveLibraryGroup' ) && $local_hold_group_match );
969
                    next if $local_hold_group_match;
948
                }
970
                }
949
            }
971
            }
950
        }
972
        }
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 393-399 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
393
('LoadCheckoutsTableDelay','0','','Delay before auto-loading checkouts table on checkouts screen','Integer'),
393
('LoadCheckoutsTableDelay','0','','Delay before auto-loading checkouts table on checkouts screen','Integer'),
394
('LoadSearchHistoryToTheFirstLoggedUser', '1', NULL, 'If ON, the next user will automatically get the last searches in their history', 'YesNo'),
394
('LoadSearchHistoryToTheFirstLoggedUser', '1', NULL, 'If ON, the next user will automatically get the last searches in their history', 'YesNo'),
395
('LocalCoverImages','0','1','Display local cover images on intranet details pages.','YesNo'),
395
('LocalCoverImages','0','1','Display local cover images on intranet details pages.','YesNo'),
396
('LocalHoldsPriority',  '0', NULL,  'Enables the LocalHoldsPriority feature',  'YesNo'),
396
('LocalHoldsPriority',  'None', 'GiveLibrary|None|GiveLibraryGroup|GiveLibraryAndGroup' 'Enables the LocalHoldsPriority feature', 'None'  'Choice'),
397
('LocalHoldsPriorityItemControl',  'holdingbranch',  'holdingbranch|homebranch',  'decides if the feature operates using the item''s home or holding library.',  'Choice'),
397
('LocalHoldsPriorityItemControl',  'holdingbranch',  'holdingbranch|homebranch',  'decides if the feature operates using the item''s home or holding library.',  'Choice'),
398
('LocalHoldsPriorityPatronControl',  'PickupLibrary',  'HomeLibrary|PickupLibrary',  'decides if the feature operates using the library set as the patron''s home library, or the library set as the pickup library for the given hold.',  'Choice'),
398
('LocalHoldsPriorityPatronControl',  'PickupLibrary',  'HomeLibrary|PickupLibrary',  'decides if the feature operates using the library set as the patron''s home library, or the library set as the pickup library for the given hold.',  'Choice'),
399
('LockExpiredDelay','','','Delay for locking expired patrons (empty means no locking)','Integer'),
399
('LockExpiredDelay','','','Delay for locking expired patrons (empty means no locking)','Integer'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-2 / +5 lines)
Lines 1024-1031 Circulation: Link Here
1024
        -
1024
        -
1025
            - pref: LocalHoldsPriority
1025
            - pref: LocalHoldsPriority
1026
              choices:
1026
              choices:
1027
                  1: Give
1027
                  GiveLibrary: Give library
1028
                  0: "Don't give"
1028
                  None: "Don't give"
1029
                  GiveLibraryGroup: Give library group
1030
                  GiveLibraryAndGroup: Give library then library group
1029
            - priority for filling holds to patrons whose
1031
            - priority for filling holds to patrons whose
1030
            - pref: LocalHoldsPriorityPatronControl
1032
            - pref: LocalHoldsPriorityPatronControl
1031
              choices:
1033
              choices:
Lines 1036-1041 Circulation: Link Here
1036
              choices:
1038
              choices:
1037
                  homebranch: "home library"
1039
                  homebranch: "home library"
1038
                  holdingbranch: "holding library"
1040
                  holdingbranch: "holding library"
1041
            - <br/><strong>Note:</strong> If a group option is selected, LocalHoldsPriorityPatronControl and LocalHoldsPriorityItemControl will use the <a href="/cgi-bin/koha/admin/library_groups.pl">library hold group</a> of the selected libraries.
1039
        -
1042
        -
1040
            - pref: OPACHoldsIfAvailableAtPickup
1043
            - pref: OPACHoldsIfAvailableAtPickup
1041
              choices:
1044
              choices:
(-)a/t/db_dependent/Holds/LocalHoldsPriority.t (-37 / +182 lines)
Lines 6-12 use t::lib::Mocks; Link Here
6
use C4::Context;
6
use C4::Context;
7
7
8
use Test::NoWarnings;
8
use Test::NoWarnings;
9
use Test::More tests => 8;
9
use Test::More tests => 7;
10
use MARC::Record;
10
use MARC::Record;
11
11
12
use Koha::Patrons;
12
use Koha::Patrons;
Lines 14-19 use Koha::Holds; Link Here
14
use C4::Biblio;
14
use C4::Biblio;
15
use C4::Items;
15
use C4::Items;
16
use Koha::Database;
16
use Koha::Database;
17
use Koha::Library::Groups;
17
18
18
use t::lib::TestBuilder;
19
use t::lib::TestBuilder;
19
20
Lines 32-37 my $library1 = $builder->build( { source => 'Branch', } ); Link Here
32
my $library2 = $builder->build( { source => 'Branch', } );
33
my $library2 = $builder->build( { source => 'Branch', } );
33
my $library3 = $builder->build( { source => 'Branch', } );
34
my $library3 = $builder->build( { source => 'Branch', } );
34
my $library4 = $builder->build( { source => 'Branch', } );
35
my $library4 = $builder->build( { source => 'Branch', } );
36
my $library5 = $builder->build( { source => 'Branch', } );
35
my $itemtype = $builder->build(
37
my $itemtype = $builder->build(
36
    {
38
    {
37
        source => 'Itemtype',
39
        source => 'Itemtype',
Lines 41-46 my $itemtype = $builder->build( Link Here
41
43
42
my $borrowers_count = 5;
44
my $borrowers_count = 5;
43
45
46
# Create some groups
47
my $group1 =
48
    Koha::Library::Group->new( { title => "Test hold group 1", ft_local_hold_group => '1' } )->store();
49
my $group2 =
50
    Koha::Library::Group->new( { title => "Test hold group 2", ft_local_hold_group => '1' } )->store();
51
52
#Add branches to the groups
53
my $group1_library1 =
54
    Koha::Library::Group->new( { parent_id => $group1->id, branchcode => $library1->{branchcode} } )->store();
55
my $group1_library2 =
56
    Koha::Library::Group->new( { parent_id => $group1->id, branchcode => $library2->{branchcode} } )->store();
57
my $group2_library1 =
58
    Koha::Library::Group->new( { parent_id => $group2->id, branchcode => $library3->{branchcode} } )->store();
59
my $group2_library2 =
60
    Koha::Library::Group->new( { parent_id => $group2->id, branchcode => $library4->{branchcode} } )->store();
61
62
# group1
63
#    group1_library1
64
#    group1_library2
65
# group2
66
#    group2_library1
67
#    group2_library2
68
44
my $biblio = $builder->build_sample_biblio();
69
my $biblio = $builder->build_sample_biblio();
45
my $item   = Koha::Item->new(
70
my $item   = Koha::Item->new(
46
    {
71
    {
Lines 52-57 my $item = Koha::Item->new( Link Here
52
    },
77
    },
53
)->store->get_from_storage;
78
)->store->get_from_storage;
54
79
80
my $item2 = Koha::Item->new(
81
    {
82
        biblionumber                      => $biblio->biblionumber,
83
        homebranch                        => $library1->{branchcode},
84
        holdingbranch                     => $library1->{branchcode},
85
        itype                             => $itemtype,
86
        exclude_from_local_holds_priority => 0,
87
    },
88
)->store->get_from_storage;
89
55
my @branchcodes = (
90
my @branchcodes = (
56
    $library1->{branchcode}, $library2->{branchcode}, $library3->{branchcode}, $library4->{branchcode},
91
    $library1->{branchcode}, $library2->{branchcode}, $library3->{branchcode}, $library4->{branchcode},
57
    $library3->{branchcode}, $library4->{branchcode}
92
    $library3->{branchcode}, $library4->{branchcode}
Lines 60-119 my $patron_category = $builder->build( { source => 'Category', value => { exclud Link Here
60
95
61
# Create some borrowers
96
# Create some borrowers
62
my @borrowernumbers;
97
my @borrowernumbers;
98
my $r = 0;
63
foreach ( 0 .. $borrowers_count - 1 ) {
99
foreach ( 0 .. $borrowers_count - 1 ) {
64
    my $borrowernumber = Koha::Patron->new(
100
    my $borrowernumber = Koha::Patron->new(
65
        {
101
        {
66
            firstname    => 'my firstname',
102
            firstname    => 'my firstname',
67
            surname      => 'my surname ' . $_,
103
            surname      => 'my surname ' . $_,
68
            categorycode => $patron_category->{categorycode},
104
            categorycode => $patron_category->{categorycode},
69
            branchcode   => $branchcodes[$_],
105
            branchcode   => $branchcodes[$r],
70
        }
106
        }
71
    )->store->borrowernumber;
107
    )->store->borrowernumber;
72
    push @borrowernumbers, $borrowernumber;
108
    push @borrowernumbers, $borrowernumber;
109
    $r++;
73
}
110
}
74
111
75
# Create five item level holds
112
# Create five record level holds
76
my $i = 1;
113
AddReserve(
77
foreach my $borrowernumber (@borrowernumbers) {
114
    {
78
    AddReserve(
115
        branchcode     => $library1,
79
        {
116
        borrowernumber => $borrowernumbers[0],
80
            branchcode     => $branchcodes[$i],
117
        biblionumber   => $item->biblionumber,
81
            borrowernumber => $borrowernumber,
118
        priority       => 1,
82
            biblionumber   => $biblio->biblionumber,
119
    }
83
            priority       => $i,
120
);
84
        }
121
AddReserve(
122
    {
123
        branchcode     => $library2,
124
        borrowernumber => $borrowernumbers[1],
125
        biblionumber   => $item->biblionumber,
126
        priority       => 1,
127
    }
128
);
129
AddReserve(
130
    {
131
        branchcode     => $library3,
132
        borrowernumber => $borrowernumbers[2],
133
        biblionumber   => $item->biblionumber,
134
        priority       => 1,
135
    }
136
);
137
AddReserve(
138
    {
139
        branchcode     => $library4,
140
        borrowernumber => $borrowernumbers[3],
141
        biblionumber   => $item->biblionumber,
142
        priority       => 1,
143
    }
144
);
145
my ( $status, $reserve, $all_reserves );
146
t::lib::Mocks::mock_preference( 'LocalHoldsPriority', 'None' );
147
( $status, $reserve, $all_reserves ) = CheckReserves($item);
148
ok( $reserve->{borrowernumber} eq $borrowernumbers[0], "Received expected results with LocalHoldsPriority disabled" );
149
150
subtest 'LocalHoldsPriority, GiveLibrary' => sub {    #Test library only priority
151
    plan tests => 4;
152
153
    t::lib::Mocks::mock_preference( 'LocalHoldsPriority', 'GiveLibrary' );
154
155
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
156
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
157
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
158
    ok(
159
        $reserve->{borrowernumber} eq $borrowernumbers[3],
160
        "Local patron is given priority when patron pickup and item home branch match"
85
    );
161
    );
86
162
87
    $i++;
163
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
88
}
164
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
165
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
166
    ok(
167
        $reserve->{borrowernumber} eq $borrowernumbers[2],
168
        "Local patron is given priority when patron pickup location and item home branch match"
169
    );
89
170
90
my ( $status, $reserve, $all_reserves );
171
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
172
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
173
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
174
    ok(
175
        $reserve->{borrowernumber} eq $borrowernumbers[2],
176
        "Local patron is given priority when patron home library and item holding branch match"
177
    );
91
178
92
t::lib::Mocks::mock_preference( 'LocalHoldsPriority', 0 );
179
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
93
( $status, $reserve, $all_reserves ) = CheckReserves($item);
180
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
94
ok( $reserve->{borrowernumber} eq $borrowernumbers[0], "Received expected results with LocalHoldsPriority disabled" );
181
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
182
    ok(
183
        $reserve->{borrowernumber} eq $borrowernumbers[3],
184
        "Local patron is given priority when patron home location and item home branch match"
185
    );
95
186
96
t::lib::Mocks::mock_preference( 'LocalHoldsPriority', 1 );
187
};
97
188
98
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
189
subtest 'LocalHoldsPriority, GiveLibraryAndGroup' => sub {    #Test library then hold group priority
99
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
190
    plan tests => 4;
100
( $status, $reserve, $all_reserves ) = CheckReserves($item);
191
    t::lib::Mocks::mock_preference( 'LocalHoldsPriority', 'GiveLibraryAndGroup' );
101
ok( $reserve->{borrowernumber} eq $borrowernumbers[2], "Received expected results with PickupLibrary/homebranch" );
102
192
103
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
193
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
104
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
194
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
105
( $status, $reserve, $all_reserves ) = CheckReserves($item);
195
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
106
ok( $reserve->{borrowernumber} eq $borrowernumbers[1], "Received expected results with PickupLibrary/holdingbranch" );
196
    ok(
197
        $reserve->{borrowernumber} eq $borrowernumbers[3],
198
        "Local patron is given priority when patron pickup and item home branch match"
199
    );
107
200
108
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
201
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
109
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
202
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
110
( $status, $reserve, $all_reserves ) = CheckReserves($item);
203
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
111
ok( $reserve->{borrowernumber} eq $borrowernumbers[2], "Received expected results with HomeLibrary/holdingbranch" );
204
    ok(
205
        $reserve->{borrowernumber} eq $borrowernumbers[2],
206
        "Local patron in group is given priority when patron pickup location and item home branch match"
207
    );
112
208
113
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
209
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
114
t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
210
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
115
( $status, $reserve, $all_reserves ) = CheckReserves($item);
211
    ( $status, $reserve, $all_reserves ) = CheckReserves($item2);
116
ok( $reserve->{borrowernumber} eq $borrowernumbers[3], "Received expected results with HomeLibrary/homebranch" );
212
    ok(
213
        $reserve->{borrowernumber} eq $borrowernumbers[0],
214
        "Local patron in group is given priority when patron home library and item holding branch match"
215
    );
216
217
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
218
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
219
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
220
    ok(
221
        $reserve->{borrowernumber} eq $borrowernumbers[3],
222
        "Local patron is given priority when patron home location and item home branch match"
223
    );
224
225
};
226
227
subtest 'LocalHoldsPriority, GiveLibraryGroup' => sub {    #Test hold group only priority
228
    plan tests => 4;
229
    t::lib::Mocks::mock_preference( 'LocalHoldsPriority', 'GiveLibraryGroup' );
230
231
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
232
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
233
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
234
    ok(
235
        $reserve->{borrowernumber} eq $borrowernumbers[3],
236
        "Local patron in group is given priority when patron pickup location and item home branch match"
237
    );
238
239
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'PickupLibrary' );
240
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
241
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
242
    ok(
243
        $reserve->{borrowernumber} eq $borrowernumbers[3],
244
        "Local patron in group is given priority when patron pickup location and item holding branch match"
245
    );
246
247
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
248
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'holdingbranch' );
249
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
250
    ok(
251
        $reserve->{borrowernumber} eq $borrowernumbers[3],
252
        "Local patron in group is given priority when patron home library and item holding branch match"
253
    );
254
255
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
256
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
257
    ( $status, $reserve, $all_reserves ) = CheckReserves($item);
258
    ok(
259
        $reserve->{borrowernumber} eq $borrowernumbers[3],
260
        "Local patron in group is given priority when patron home library and item home branch matchh"
261
    );
262
};
117
263
118
$schema->storage->txn_rollback;
264
$schema->storage->txn_rollback;
119
265
Lines 122-128 subtest "exclude from local holds" => sub { Link Here
122
268
123
    $schema->storage->txn_begin;
269
    $schema->storage->txn_begin;
124
270
125
    t::lib::Mocks::mock_preference( 'LocalHoldsPriority',              1 );
271
    t::lib::Mocks::mock_preference( 'LocalHoldsPriority',              'GiveLibrary' );
126
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
272
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityPatronControl', 'HomeLibrary' );
127
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
273
    t::lib::Mocks::mock_preference( 'LocalHoldsPriorityItemControl',   'homebranch' );
128
274
129
- 

Return to bug 20747