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

(-)a/C4/Circulation.pm (-66 / +148 lines)
Lines 373-381 sub transferbook { Link Here
373
373
374
374
375
sub TooMany {
375
sub TooMany {
376
    my $borrower        = shift;
376
    my $borrower = shift;
377
    my $biblionumber = shift;
377
    my $biblionumber = shift;
378
	my $item		= shift;
378
    my $item = shift;
379
    my $params = shift;
379
    my $params = shift;
380
    my $onsite_checkout = $params->{onsite_checkout} || 0;
380
    my $onsite_checkout = $params->{onsite_checkout} || 0;
381
    my $switch_onsite_checkout = $params->{switch_onsite_checkout} || 0;
381
    my $switch_onsite_checkout = $params->{switch_onsite_checkout} || 0;
Lines 388-395 sub TooMany { Link Here
388
  			? $item->{'itype'}         # item-level
388
  			? $item->{'itype'}         # item-level
389
			: $item->{'itemtype'};     # biblio-level
389
			: $item->{'itemtype'};     # biblio-level
390
 
390
 
391
    my ($type_object, $parent_type, $parent_maxissueqty_rule);
392
    $type_object = Koha::ItemTypes->find( $type );
393
    $parent_type = $type_object->parent_type if $type_object;
394
    my $child_types = Koha::ItemTypes->search( parent_type => $type );
395
    # Find any children if we are a parent_type;
396
391
    # given branch, patron category, and item type, determine
397
    # given branch, patron category, and item type, determine
392
    # applicable issuing rule
398
    # applicable issuing rule
399
400
    $parent_maxissueqty_rule = Koha::CirculationRules->get_effective_rule(
401
        {
402
            categorycode => $cat_borrower,
403
            itemtype     => $parent_type,
404
            branchcode   => $branch,
405
            rule_name    => 'maxissueqty',
406
        }
407
    ) if $parent_type;
408
    # If the parent rule is for default type we discount it
409
    $parent_maxissueqty_rule = undef if $parent_maxissueqty_rule && $parent_maxissueqty_rule->itemtype eq '*';
410
393
    my $maxissueqty_rule = Koha::CirculationRules->get_effective_rule(
411
    my $maxissueqty_rule = Koha::CirculationRules->get_effective_rule(
394
        {
412
        {
395
            categorycode => $cat_borrower,
413
            categorycode => $cat_borrower,
Lines 398-403 sub TooMany { Link Here
398
            rule_name    => 'maxissueqty',
416
            rule_name    => 'maxissueqty',
399
        }
417
        }
400
    );
418
    );
419
420
401
    my $maxonsiteissueqty_rule = Koha::CirculationRules->get_effective_rule(
421
    my $maxonsiteissueqty_rule = Koha::CirculationRules->get_effective_rule(
402
        {
422
        {
403
            categorycode => $cat_borrower,
423
            categorycode => $cat_borrower,
Lines 412-420 sub TooMany { Link Here
412
    # how many loans the patron already has that meet that
432
    # how many loans the patron already has that meet that
413
    # rule
433
    # rule
414
    if (defined($maxissueqty_rule) and defined($maxissueqty_rule->rule_value)) {
434
    if (defined($maxissueqty_rule) and defined($maxissueqty_rule->rule_value)) {
435
415
        my @bind_params;
436
        my @bind_params;
416
        my $count_query = q|
437
        my $count_query = "";
417
            SELECT COUNT(*) AS total, COALESCE(SUM(onsite_checkout), 0) AS onsite_checkouts
438
439
        if (C4::Context->preference('item-level_itypes')) {
440
            $count_query .= q|SELECT COALESCE( SUM( IF(items.itype = '| .$type . q|',1,0) ), 0) as type_total, COUNT(*) AS total, COALESCE(SUM(onsite_checkout), 0) AS onsite_checkouts|;
441
        } else{
442
            $count_query .= q|SELECT COALESCE(SUM( IF(biblioitems.itype = '| .$type . q|',1,0) ), 0) as type_total, COUNT(*) AS total, COALESCE(SUM(onsite_checkout), 0) AS onsite_checkouts|;
443
        }
444
445
        $count_query .= q|
418
            FROM issues
446
            FROM issues
419
            JOIN items USING (itemnumber)
447
            JOIN items USING (itemnumber)
420
        |;
448
        |;
Lines 444-458 sub TooMany { Link Here
444
            push @bind_params, $maxissueqty_rule->categorycode;
472
            push @bind_params, $maxissueqty_rule->categorycode;
445
            push @bind_params, $cat_borrower;
473
            push @bind_params, $cat_borrower;
446
        } else {
474
        } else {
447
            # rule has specific item type, so count loans of that
475
            my @types;
448
            # specific item type
476
            if ( $parent_maxissueqty_rule ) {
477
            # if we have a parent item type then we count loans of the
478
            # specific item type or its siblings or parent
479
                push @types, $parent_type;
480
                my $children = Koha::ItemTypes->search({ parent_type => $parent_type });
481
                while ( my $child = $children->next ){
482
                    push @types, $child->itemtype;
483
                }
484
            } elsif ( $child_types ) {
485
            # If we are a parent type, we need to count all child types and our own type
486
                while ( my $child = $child_types->next ){
487
                    push @types, $child->itemtype;
488
                }
489
                push @types, $type; # And don't forget to count our own types
490
            } else { push @types, $type; } # Otherwise only count the specific itemtype
491
            my $types_param = ( '?,' ) x @types;
492
            $types_param =~ s/,$//;
449
            if (C4::Context->preference('item-level_itypes')) {
493
            if (C4::Context->preference('item-level_itypes')) {
450
                $count_query .= " WHERE items.itype = ? ";
494
                $count_query .= " WHERE items.itype IN (" . $types_param . ")";
451
            } else { 
495
            } else { 
452
                $count_query .= " JOIN  biblioitems USING (biblionumber) 
496
                $count_query .= " JOIN  biblioitems USING (biblionumber) 
453
                                  WHERE biblioitems.itemtype= ? ";
497
                                  WHERE biblioitems.itemtype IN (" . $types_param . ")";
454
            }
498
            }
455
            push @bind_params, $type;
499
            push @bind_params, @types;
456
        }
500
        }
457
501
458
        $count_query .= " AND borrowernumber = ? ";
502
        $count_query .= " AND borrowernumber = ? ";
Lines 470-507 sub TooMany { Link Here
470
            }
514
            }
471
        }
515
        }
472
516
473
        my ( $checkout_count, $onsite_checkout_count ) = $dbh->selectrow_array( $count_query, {}, @bind_params );
517
        my ( $checkout_count_type, $checkout_count, $onsite_checkout_count ) = $dbh->selectrow_array( $count_query, {}, @bind_params );
474
518
475
        my $max_checkouts_allowed = $maxissueqty_rule ? $maxissueqty_rule->rule_value : undef;
476
        my $max_onsite_checkouts_allowed = $maxonsiteissueqty_rule ? $maxonsiteissueqty_rule->rule_value : undef;
519
        my $max_onsite_checkouts_allowed = $maxonsiteissueqty_rule ? $maxonsiteissueqty_rule->rule_value : undef;
477
520
478
        if ( $onsite_checkout and defined $max_onsite_checkouts_allowed ) {
521
        # If parent rules exists
479
            if ( $onsite_checkout_count >= $max_onsite_checkouts_allowed )  {
522
        if ( defined($parent_maxissueqty_rule) and defined($parent_maxissueqty_rule->rule_value) ){
480
                return {
523
            my $max_checkouts_allowed = $parent_maxissueqty_rule->rule_value;
481
                    reason => 'TOO_MANY_ONSITE_CHECKOUTS',
524
482
                    count => $onsite_checkout_count,
525
            my $qty_over = _check_max_qty({
483
                    max_allowed => $max_onsite_checkouts_allowed,
526
                checkout_count => $checkout_count,
484
                }
527
                onsite_checkout_count => $onsite_checkout_count,
485
            }
528
                onsite_checkout => $onsite_checkout,
486
        }
529
                max_checkouts_allowed => $max_checkouts_allowed,
487
        if ( C4::Context->preference('ConsiderOnSiteCheckoutsAsNormalCheckouts') ) {
530
                max_onsite_checkouts_allowed => $max_onsite_checkouts_allowed,
488
            my $delta = $switch_onsite_checkout ? 1 : 0;
531
                switch_onsite_checkout       => $switch_onsite_checkout
489
            if ( $checkout_count >= $max_checkouts_allowed + $delta ) {
532
            });
490
                return {
533
            return $qty_over if defined $qty_over;
491
                    reason => 'TOO_MANY_CHECKOUTS',
534
492
                    count => $checkout_count,
535
493
                    max_allowed => $max_checkouts_allowed,
536
           # If the parent rule is less than or equal to the child, we only need check the parent
494
                };
537
           if( $maxissueqty_rule->rule_value < $parent_maxissueqty_rule->rule_value && defined($maxissueqty_rule->itemtype) ) {
495
            }
538
               my $max_checkouts_allowed = $maxissueqty_rule->rule_value;
496
        } elsif ( not $onsite_checkout ) {
539
               my $qty_over = _check_max_qty({
497
            if ( $checkout_count - $onsite_checkout_count >= $max_checkouts_allowed )  {
540
                   checkout_count => $checkout_count_type,
498
                return {
541
                   onsite_checkout_count => $onsite_checkout_count,
499
                    reason => 'TOO_MANY_CHECKOUTS',
542
                   onsite_checkout => $onsite_checkout,
500
                    count => $checkout_count - $onsite_checkout_count,
543
                   max_checkouts_allowed => $max_checkouts_allowed,
501
                    max_allowed => $max_checkouts_allowed,
544
                   max_onsite_checkouts_allowed => $max_onsite_checkouts_allowed,
502
                };
545
                   switch_onsite_checkout       => $switch_onsite_checkout
503
            }
546
               });
547
               return $qty_over if defined $qty_over;
548
           }
549
550
        } else {
551
            my $max_checkouts_allowed = $maxissueqty_rule->rule_value;
552
            my $qty_over = _check_max_qty({
553
                checkout_count => $checkout_count,
554
                onsite_checkout_count => $onsite_checkout_count,
555
                onsite_checkout => $onsite_checkout,
556
                max_checkouts_allowed => $max_checkouts_allowed,
557
                max_onsite_checkouts_allowed => $max_onsite_checkouts_allowed,
558
                switch_onsite_checkout       => $switch_onsite_checkout
559
            });
560
            return $qty_over if defined $qty_over;
504
        }
561
        }
562
563
505
    }
564
    }
506
565
507
    # Now count total loans against the limit for the branch
566
    # Now count total loans against the limit for the branch
Lines 527-561 sub TooMany { Link Here
527
        }
586
        }
528
        my ( $checkout_count, $onsite_checkout_count ) = $dbh->selectrow_array( $branch_count_query, {}, @bind_params );
587
        my ( $checkout_count, $onsite_checkout_count ) = $dbh->selectrow_array( $branch_count_query, {}, @bind_params );
529
        my $max_checkouts_allowed = $branch_borrower_circ_rule->{patron_maxissueqty};
588
        my $max_checkouts_allowed = $branch_borrower_circ_rule->{patron_maxissueqty};
530
        my $max_onsite_checkouts_allowed = $branch_borrower_circ_rule->{patron_maxonsiteissueqty};
589
        my $max_onsite_checkouts_allowed = $branch_borrower_circ_rule->{patron_maxonsiteissueqty} || undef;
531
590
532
        if ( $onsite_checkout and $max_onsite_checkouts_allowed ne '' ) {
591
        my $qty_over = _check_max_qty({
533
            if ( $onsite_checkout_count >= $max_onsite_checkouts_allowed )  {
592
            checkout_count => $checkout_count,
534
                return {
593
            onsite_checkout_count => $onsite_checkout_count,
535
                    reason => 'TOO_MANY_ONSITE_CHECKOUTS',
594
            onsite_checkout => $onsite_checkout,
536
                    count => $onsite_checkout_count,
595
            max_checkouts_allowed => $max_checkouts_allowed,
537
                    max_allowed => $max_onsite_checkouts_allowed,
596
            max_onsite_checkouts_allowed => $max_onsite_checkouts_allowed,
538
                }
597
            switch_onsite_checkout       => $switch_onsite_checkout
539
            }
598
        });
540
        }
599
        return $qty_over if defined $qty_over;
541
        if ( C4::Context->preference('ConsiderOnSiteCheckoutsAsNormalCheckouts') ) {
600
542
            my $delta = $switch_onsite_checkout ? 1 : 0;
543
            if ( $checkout_count >= $max_checkouts_allowed + $delta ) {
544
                return {
545
                    reason => 'TOO_MANY_CHECKOUTS',
546
                    count => $checkout_count,
547
                    max_allowed => $max_checkouts_allowed,
548
                };
549
            }
550
        } elsif ( not $onsite_checkout ) {
551
            if ( $checkout_count - $onsite_checkout_count >= $max_checkouts_allowed )  {
552
                return {
553
                    reason => 'TOO_MANY_CHECKOUTS',
554
                    count => $checkout_count - $onsite_checkout_count,
555
                    max_allowed => $max_checkouts_allowed,
556
                };
557
            }
558
        }
559
    }
601
    }
560
602
561
    if ( not defined( $maxissueqty_rule ) and not defined($branch_borrower_circ_rule->{patron_maxissueqty}) ) {
603
    if ( not defined( $maxissueqty_rule ) and not defined($branch_borrower_circ_rule->{patron_maxissueqty}) ) {
Lines 566-571 sub TooMany { Link Here
566
    return;
608
    return;
567
}
609
}
568
610
611
sub _check_max_qty {
612
    my $params = shift;
613
    my $checkout_count = $params->{checkout_count};
614
    my $onsite_checkout_count = $params->{onsite_checkout_count};
615
    my $onsite_checkout = $params->{onsite_checkout};
616
    my $max_checkouts_allowed = $params->{max_checkouts_allowed};
617
    my $max_onsite_checkouts_allowed = $params->{max_onsite_checkouts_allowed};
618
    my $switch_onsite_checkout = $params->{switch_onsite_checkout};
619
620
    if ( $onsite_checkout and defined $max_onsite_checkouts_allowed ) {
621
        if ( $onsite_checkout_count >= $max_onsite_checkouts_allowed )  {
622
            return {
623
                reason => 'TOO_MANY_ONSITE_CHECKOUTS',
624
                count => $onsite_checkout_count,
625
                max_allowed => $max_onsite_checkouts_allowed,
626
            }
627
        }
628
    }
629
    if ( C4::Context->preference('ConsiderOnSiteCheckoutsAsNormalCheckouts') ) {
630
        my $delta = $switch_onsite_checkout ? 1 : 0;
631
        if ( $checkout_count >= $max_checkouts_allowed + $delta ) {
632
            return {
633
                reason => 'TOO_MANY_CHECKOUTS',
634
                count => $checkout_count,
635
                max_allowed => $max_checkouts_allowed,
636
            };
637
        }
638
    } elsif ( not $onsite_checkout ) {
639
        if ( $checkout_count - $onsite_checkout_count >= $max_checkouts_allowed )  {
640
            return {
641
                reason => 'TOO_MANY_CHECKOUTS',
642
                count => $checkout_count - $onsite_checkout_count,
643
                max_allowed => $max_checkouts_allowed,
644
            };
645
        }
646
    }
647
648
    return;
649
}
650
569
=head2 CanBookBeIssued
651
=head2 CanBookBeIssued
570
652
571
  ( $issuingimpossible, $needsconfirmation, [ $alerts ] ) =  CanBookBeIssued( $patron,
653
  ( $issuingimpossible, $needsconfirmation, [ $alerts ] ) =  CanBookBeIssued( $patron,
(-)a/t/db_dependent/Circulation/TooMany.t (-2 / +235 lines)
Lines 15-21 Link Here
15
# with Koha; if not, see <http://www.gnu.org/licenses>.
15
# with Koha; if not, see <http://www.gnu.org/licenses>.
16
16
17
use Modern::Perl;
17
use Modern::Perl;
18
use Test::More tests => 7;
18
use Test::More tests => 8;
19
use C4::Context;
19
use C4::Context;
20
20
21
use C4::Members;
21
use C4::Members;
Lines 469-474 subtest '1 BranchBorrowerCircRule exist: 1 CO allowed, 1 OSCO allowed' => sub { Link Here
469
    teardown();
469
    teardown();
470
};
470
};
471
471
472
subtest 'itemtype group tests' => sub {
473
    plan tests => 13;
474
475
    my $rule = $builder->build({
476
        source => 'Issuingrule',
477
        value => {
478
            categorycode => '*',
479
            itemtype     => '*',
480
            branchcode   => '*',
481
            issuelength  => 1,
482
            firstremind  => 1,        # 1 day of grace
483
            finedays     => 2,        # 2 days of fine per day of overdue
484
            lengthunit   => 'days',
485
        }
486
    });
487
488
    my $parent_itype = $builder->build({
489
        source=>'Itemtype',
490
        value => {
491
            parent_type => undef,
492
            rentalcharge => undef,
493
            rentalcharge_daily => undef,
494
            rentalcharge_hourly => undef,
495
            notforloan => 0,
496
        }
497
    });
498
    my $child_itype_1 = $builder->build({
499
        source=>'Itemtype',
500
        value => {
501
            parent_type => $parent_itype->{itemtype},
502
            rentalcharge => 0,
503
            rentalcharge_daily => 0,
504
            rentalcharge_hourly => 0,
505
            notforloan => 0,
506
        }
507
    });
508
    my $child_itype_2 = $builder->build({
509
        source=>'Itemtype',
510
        value => {
511
            parent_type => $parent_itype->{itemtype},
512
            rentalcharge => 0,
513
            rentalcharge_daily => 0,
514
            rentalcharge_hourly => 0,
515
            notforloan => 0,
516
        }
517
    });
518
519
    my $branch = $builder->build({source => 'Branch',});
520
    my $category = $builder->build({source => 'Category',});
521
    my $patron = $builder->build({
522
        source => 'Borrower',
523
        value => {
524
            categorycode => $category->{categorycode},
525
            branchcode => $branch->{branchcode},
526
        },
527
    });
528
    my $item = $builder->build_sample_item({
529
        homebranch=>$branch->{branchcode},
530
        holdingbranch=>$branch->{branchcode},
531
        itype=>$child_itype_1->{itemtype}
532
    });
533
534
    my $all_iq_rule = $builder->build({
535
        source=>'CirculationRule',
536
        value => {
537
            branchcode   => $branch->{branchcode},
538
            categorycode => $category->{categorycode},
539
            itemtype     => undef,
540
            rule_name    => 'maxissueqty',
541
            rule_value   => 1
542
        }
543
    });
544
    is(
545
        C4::Circulation::TooMany( $patron, $item->biblionumber, $item->unblessed ),
546
        undef,
547
        'Checkout allowed, using all rule of 1'
548
    );
549
550
    #Checkout an item
551
    my $issue = C4::Circulation::AddIssue( $patron, $item->barcode, dt_from_string() );
552
    like( $issue->issue_id, qr|^\d+$|, 'The issue should have been inserted' );
553
    #Patron has 1 checkout of child itype1
554
555
    my $parent_iq_rule = $builder->build({
556
        source=>'CirculationRule',
557
        value => {
558
            branchcode   => $branch->{branchcode},
559
            categorycode => $category->{categorycode},
560
            itemtype     => $parent_itype->{itemtype},
561
            rule_name    => 'maxissueqty',
562
            rule_value   => 2
563
        }
564
    });
565
566
    is(
567
        C4::Circulation::TooMany( $patron, $item->biblionumber, $item->unblessed ),
568
        undef,
569
        'Checkout allowed, using parent type rule of 2'
570
    );
571
572
    my $child1_iq_rule = $builder->build_object({
573
        class=>'Koha::CirculationRules',
574
        value => {
575
            branchcode   => $branch->{branchcode},
576
            categorycode => $category->{categorycode},
577
            itemtype     => $child_itype_1->{itemtype},
578
            rule_name    => 'maxissueqty',
579
            rule_value   => 1
580
        }
581
    });
582
583
    is_deeply(
584
        C4::Circulation::TooMany( $patron, $item->biblionumber, $item->unblessed ),
585
        {
586
            reason => 'TOO_MANY_CHECKOUTS',
587
            count => 1,
588
            max_allowed => 1,
589
        },
590
        'Checkout not allowed, using specific type rule of 1'
591
    );
592
593
    my $item_1 = $builder->build_sample_item({
594
        homebranch=>$branch->{branchcode},
595
        holdingbranch=>$branch->{branchcode},
596
        itype=>$child_itype_2->{itemtype}
597
    });
598
599
    my $child2_iq_rule = $builder->build({
600
        source=>'CirculationRule',
601
        value => {
602
            branchcode   => $branch->{branchcode},
603
            categorycode => $category->{categorycode},
604
            itemtype     => $child_itype_2->{itemtype},
605
            rule_name    => 'maxissueqty',
606
            rule_value   => 3
607
        }
608
    });
609
610
    is(
611
        C4::Circulation::TooMany( $patron, $item_1->biblionumber, $item_1->unblessed ),
612
        undef,
613
        'Checkout allowed'
614
    );
615
616
    #checkout an item
617
    $issue = C4::Circulation::AddIssue( $patron, $item_1->barcode, dt_from_string());
618
    like( $issue->issue_id, qr|^\d+$|, 'the issue should have been inserted' );
619
    #patron has 1 checkout of childitype1 and 1 checkout of childitype2
620
621
    is_deeply(
622
        C4::Circulation::TooMany( $patron, $item->biblionumber, $item->unblessed ),
623
        {
624
            reason => 'TOO_MANY_CHECKOUTS',
625
            count => 2,
626
            max_allowed => 2,
627
        },
628
        'Checkout not allowed, using parent type rule of 2, checkout of sibling itemtype counted'
629
    );
630
631
    my $parent_item = $builder->build_sample_item({
632
        homebranch=>$branch->{branchcode},
633
        holdingbranch=>$branch->{branchcode},
634
        itype=>$parent_itype->{itemtype}
635
    });
636
637
    is_deeply(
638
        C4::Circulation::TooMany( $patron, $parent_item->biblionumber, $parent_item->unblessed ),
639
        {
640
            reason => 'TOO_MANY_CHECKOUTS',
641
            count => 2,
642
            max_allowed => 2,
643
        },
644
        'Checkout not allowed, using parent type rule of 2, checkout of child itemtypes counted'
645
    );
646
647
648
    #increase parent type to greater than specific
649
    my $circ_rule_object = Koha::CirculationRules->find( $parent_iq_rule->{id} );
650
    $circ_rule_object->rule_value(4)->store();
651
652
    is(
653
        C4::Circulation::TooMany( $patron, $item->biblionumber, $item_1->unblessed ),
654
        undef,
655
        'Checkout allowed, using specific type rule of 3'
656
    );
657
658
    my $item_2 = $builder->build_sample_item({
659
        homebranch=>$branch->{branchcode},
660
        holdingbranch=>$branch->{branchcode},
661
        itype=>$child_itype_2->{itemtype}
662
    });
663
    #checkout an item
664
    $issue = C4::Circulation::AddIssue( $patron, $item_2->barcode, dt_from_string(), undef, undef, undef );
665
    like( $issue->issue_id, qr|^\d+$|, 'the issue should have been inserted' );
666
    #patron has 1 checkoout of childitype1 and 2 of childitype2
667
668
    is(
669
        C4::Circulation::TooMany( $patron, $item_2->biblionumber, $item_2->unblessed ),
670
        undef,
671
        'Checkout allowed, using specific type rule of 3, checkout of sibling itemtype not counted'
672
    );
673
674
    $child1_iq_rule->rule_value(2)->store(); #Allow 2 checkouts for child type 1
675
676
    my $item_3 = $builder->build_sample_item({
677
        homebranch=>$branch->{branchcode},
678
        holdingbranch=>$branch->{branchcode},
679
        itype=>$child_itype_1->{itemtype}
680
    });
681
    my $item_4 = $builder->build_sample_item({
682
        homebranch=>$branch->{branchcode},
683
        holdingbranch=>$branch->{branchcode},
684
        itype=>$child_itype_2->{itemtype}
685
    });
686
687
    #checkout an item
688
    $issue = C4::Circulation::AddIssue( $patron, $item_4->barcode, dt_from_string(), undef, undef, undef );
689
    like( $issue->issue_id, qr|^\d+$|, 'the issue should have been inserted' );
690
    #patron has 1 checkout of childitype 1 and 3 of childitype2
691
692
    is_deeply(
693
        C4::Circulation::TooMany( $patron, $item_3->biblionumber, $item_3->unblessed ),
694
        {
695
            reason => 'TOO_MANY_CHECKOUTS',
696
            max_allowed => 4,
697
            count => 4,
698
        },
699
        'Checkout not allowed, using specific type rule of 2, checkout of sibling itemtype not counted, but parent rule (4) prevents another'
700
    );
701
702
703
704
};
705
472
$schema->storage->txn_rollback;
706
$schema->storage->txn_rollback;
473
707
474
sub teardown {
708
sub teardown {
475
- 

Return to bug 21946