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

(-)a/t/db_dependent/HoldsQueue.t (-1 lines)
Lines 950-956 subtest "Test Local Holds Priority - Ensure no duplicate requests in holds queue Link Here
950
    $dbh->do("DELETE FROM tmp_holdsqueue");
950
    $dbh->do("DELETE FROM tmp_holdsqueue");
951
    $dbh->do("DELETE FROM hold_fill_targets");
951
    $dbh->do("DELETE FROM hold_fill_targets");
952
    $dbh->do("DELETE FROM reserves");
952
    $dbh->do("DELETE FROM reserves");
953
    $dbh->do("DELETE FROM issuingrules");
954
    $dbh->do("DELETE FROM circulation_rules");
953
    $dbh->do("DELETE FROM circulation_rules");
955
    Koha::Biblios->delete();
954
    Koha::Biblios->delete();
956
955
(-)a/t/db_dependent/Koha/Biblio.t (-15 / +10 lines)
Lines 187-201 subtest 'pickup_locations' => sub { Link Here
187
    Koha::Patrons->search->delete;
187
    Koha::Patrons->search->delete;
188
    Koha::Items->search->delete;
188
    Koha::Items->search->delete;
189
    Koha::Libraries->search->delete;
189
    Koha::Libraries->search->delete;
190
    Koha::CirculationRules->search->delete;
190
    $dbh->do('DELETE FROM issues');
191
    $dbh->do('DELETE FROM issues');
191
    $dbh->do('DELETE FROM issuingrules');
192
    Koha::CirculationRules->set_rules(
192
    $dbh->do(
193
        {
193
        q{INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed)
194
            categorycode => undef,
194
        VALUES (?, ?, ?, ?)},
195
            itemtype     => undef,
195
        {},
196
            branchcode   => undef,
196
        '*', '*', '*', 25
197
            rules        => {
198
                reservesallowed => 25,
199
            }
200
        }
197
    );
201
    );
198
    $dbh->do('DELETE FROM circulation_rules');
199
202
200
    my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
203
    my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
201
    my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
204
    my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
Lines 214-220 subtest 'pickup_locations' => sub { Link Here
214
        {
217
        {
215
            branchcode => $library1->branchcode,
218
            branchcode => $library1->branchcode,
216
            itemtype   => undef,
219
            itemtype   => undef,
217
            categorycode => undef,
218
            rules => {
220
            rules => {
219
                holdallowed => 1,
221
                holdallowed => 1,
220
                hold_fulfillment_policy => 'any',
222
                hold_fulfillment_policy => 'any',
Lines 227-233 subtest 'pickup_locations' => sub { Link Here
227
        {
229
        {
228
            branchcode => $library2->branchcode,
230
            branchcode => $library2->branchcode,
229
            itemtype   => undef,
231
            itemtype   => undef,
230
            categorycode => undef,
231
            rules => {
232
            rules => {
232
                holdallowed => 3,
233
                holdallowed => 3,
233
                hold_fulfillment_policy => 'holdgroup',
234
                hold_fulfillment_policy => 'holdgroup',
Lines 240-246 subtest 'pickup_locations' => sub { Link Here
240
        {
241
        {
241
            branchcode => $library3->branchcode,
242
            branchcode => $library3->branchcode,
242
            itemtype   => undef,
243
            itemtype   => undef,
243
            categorycode => undef,
244
            rules => {
244
            rules => {
245
                holdallowed => 3,
245
                holdallowed => 3,
246
                hold_fulfillment_policy => 'patrongroup',
246
                hold_fulfillment_policy => 'patrongroup',
Lines 253-259 subtest 'pickup_locations' => sub { Link Here
253
        {
253
        {
254
            branchcode => $library4->branchcode,
254
            branchcode => $library4->branchcode,
255
            itemtype   => undef,
255
            itemtype   => undef,
256
            categorycode => undef,
257
            rules => {
256
            rules => {
258
                holdallowed => 2,
257
                holdallowed => 2,
259
                hold_fulfillment_policy => 'holdingbranch',
258
                hold_fulfillment_policy => 'holdingbranch',
Lines 266-272 subtest 'pickup_locations' => sub { Link Here
266
        {
265
        {
267
            branchcode => $library5->branchcode,
266
            branchcode => $library5->branchcode,
268
            itemtype   => undef,
267
            itemtype   => undef,
269
            categorycode => undef,
270
            rules => {
268
            rules => {
271
                holdallowed => 2,
269
                holdallowed => 2,
272
                hold_fulfillment_policy => 'homebranch',
270
                hold_fulfillment_policy => 'homebranch',
Lines 279-285 subtest 'pickup_locations' => sub { Link Here
279
        {
277
        {
280
            branchcode => $library6->branchcode,
278
            branchcode => $library6->branchcode,
281
            itemtype   => undef,
279
            itemtype   => undef,
282
            categorycode => undef,
283
            rules => {
280
            rules => {
284
                holdallowed => 1,
281
                holdallowed => 1,
285
                hold_fulfillment_policy => 'holdgroup',
282
                hold_fulfillment_policy => 'holdgroup',
Lines 292-298 subtest 'pickup_locations' => sub { Link Here
292
        {
289
        {
293
            branchcode => $library7->branchcode,
290
            branchcode => $library7->branchcode,
294
            itemtype   => undef,
291
            itemtype   => undef,
295
            categorycode => undef,
296
            rules => {
292
            rules => {
297
                holdallowed => 3,
293
                holdallowed => 3,
298
                hold_fulfillment_policy => 'holdingbranch',
294
                hold_fulfillment_policy => 'holdingbranch',
Lines 306-312 subtest 'pickup_locations' => sub { Link Here
306
        {
302
        {
307
            branchcode => $library8->branchcode,
303
            branchcode => $library8->branchcode,
308
            itemtype   => undef,
304
            itemtype   => undef,
309
            categorycode => undef,
310
            rules => {
305
            rules => {
311
                holdallowed => 2,
306
                holdallowed => 2,
312
                hold_fulfillment_policy => 'patrongroup',
307
                hold_fulfillment_policy => 'patrongroup',
(-)a/t/db_dependent/Koha/Item.t (-8 / +10 lines)
Lines 157-170 subtest 'pickup_locations' => sub { Link Here
157
    Koha::Items->search->delete;
157
    Koha::Items->search->delete;
158
    Koha::Libraries->search->delete;
158
    Koha::Libraries->search->delete;
159
    $dbh->do('DELETE FROM issues');
159
    $dbh->do('DELETE FROM issues');
160
    $dbh->do('DELETE FROM issuingrules');
160
    Koha::CirculationRules->search->delete;
161
    $dbh->do(
161
    Koha::CirculationRules->set_rules(
162
        q{INSERT INTO issuingrules (categorycode, branchcode, itemtype, reservesallowed)
162
        {
163
        VALUES (?, ?, ?, ?)},
163
            categorycode => undef,
164
        {},
164
            itemtype     => undef,
165
        '*', '*', '*', 25
165
            branchcode   => undef,
166
            rules        => {
167
                reservesallowed => 25,
168
            }
169
        }
166
    );
170
    );
167
    $dbh->do('DELETE FROM circulation_rules');
168
171
169
    my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
172
    my $root1 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
170
    my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
173
    my $root2 = $builder->build_object( { class => 'Koha::Library::Groups', value => { ft_local_hold_group => 1 } } );
Lines 273-279 subtest 'pickup_locations' => sub { Link Here
273
            {
276
            {
274
                branchcode => undef,
277
                branchcode => undef,
275
                itemtype   => undef,
278
                itemtype   => undef,
276
                categorycode => undef,
277
                rules => {
279
                rules => {
278
                    holdallowed => $ha,
280
                    holdallowed => $ha,
279
                    hold_fulfillment_policy => $hfp,
281
                    hold_fulfillment_policy => $hfp,
(-)a/t/db_dependent/selenium/basic_workflow.t (-6 / +6 lines)
Lines 72-78 our $sample_data = { Link Here
72
    issuingrule => {
72
    issuingrule => {
73
        categorycode  => 'test_cat',
73
        categorycode  => 'test_cat',
74
        itemtype      => 'IT4test',
74
        itemtype      => 'IT4test',
75
        branchcode    => '*',
75
        branchcode    => undef,
76
        maxissueqty   => '5',
76
        maxissueqty   => '5',
77
        issuelength   => '5',
77
        issuelength   => '5',
78
        lengthunit    => 'days',
78
        lengthunit    => 'days',
Lines 146-162 SKIP: { Link Here
146
    time_diff("add biblio");
146
    time_diff("add biblio");
147
147
148
    my $itemtype = $sample_data->{itemtype};
148
    my $itemtype = $sample_data->{itemtype};
149
    $dbh->do(q|INSERT INTO itemtypes (itemtype, description, rentalcharge, notforloan) VALUES (?, ?, ?, ?)|, undef, $itemtype->{itemtype}, $itemtype->{description}, $itemtype->{rentalcharge}, $itemtype->{notforloan});
150
149
151
    my $issuing_rules = $sample_data->{issuingrule};
150
    my $issuing_rules = $sample_data->{issuingrule};
152
    $dbh->do(q|INSERT INTO issuingrules (categorycode, itemtype, branchcode, issuelength, lengthunit, renewalperiod) VALUES (?, ?, ?, ?, ?, ?)|, undef, $issuing_rules->{categorycode}, $issuing_rules->{itemtype}, $issuing_rules->{branchcode}, $issuing_rules->{issuelength}, $issuing_rules->{lengthunit}, $issuing_rules->{renewalperiod});
153
    Koha::CirculationRules->set_rules(
151
    Koha::CirculationRules->set_rules(
154
        {
152
        {
155
            categorycode => $issuing_rules->{categorycode},
153
            categorycode => $issuing_rules->{categorycode},
156
            itemtype     => $issuing_rules->{itemtype},
154
            itemtype     => $issuing_rules->{itemtype},
157
            branchcode   => $issuing_rules->{branchcode},
155
            branchcode   => $issuing_rules->{branchcode},
158
            rules        => {
156
            rules        => {
159
                maxissueqty => $issuing_rules->{maxissueqty}
157
                maxissueqty => $issuing_rules->{maxissueqty},
158
                issuelength => $issuing_rules->{issuelength},
159
                lengthunit => $issuing_rules->{lengthunit},
160
                renewalperiod => $issuing_rules->{renewalperiod},
160
            }
161
            }
161
        }
162
        }
162
    );
163
    );
Lines 245-251 sub cleanup { Link Here
245
        $dbh->do(qq|DELETE FROM biblio WHERE title = "test biblio $i"|);
246
        $dbh->do(qq|DELETE FROM biblio WHERE title = "test biblio $i"|);
246
    };
247
    };
247
    $dbh->do(q|DELETE FROM itemtypes WHERE itemtype=?|, undef, $sample_data->{itemtype}{itemtype});
248
    $dbh->do(q|DELETE FROM itemtypes WHERE itemtype=?|, undef, $sample_data->{itemtype}{itemtype});
248
    $dbh->do(q|DELETE FROM issuingrules WHERE categorycode=? AND itemtype=? AND branchcode=?|, undef, $sample_data->{issuingrule}{categorycode}, $sample_data->{issuingrule}{itemtype}, $sample_data->{issuingrule}{branchcode});
249
    $dbh->do(q|DELETE FROM circulation_rules WHERE categorycode=? AND itemtype=? AND branchcode=?|, undef, $sample_data->{issuingrule}{categorycode}, $sample_data->{issuingrule}{itemtype}, $sample_data->{issuingrule}{branchcode});
249
}
250
}
250
251
251
sub time_diff {
252
sub time_diff {
252
- 

Return to bug 18936