[Koha-bugs] [Bug 22489] New: Onboarding tool fails due to inserting maxissueqty into IssuingRule

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Mar 11 06:24:32 CET 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22489

            Bug ID: 22489
           Summary: Onboarding tool fails due to inserting maxissueqty
                    into IssuingRule
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: major
          Priority: P5 - low
         Component: Installation and upgrade (web-based installer)
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: hayleymapley at catalyst.net.nz
        QA Contact: testopia at bugs.koha-community.org
                CC: gmcharlt at gmail.com
  Target Milestone: ---

When going through the onboarding process, the  tool fails on submit of Step 5
- creating an issuing rule. This is due to the maxissueqty column having been
removed from the IssuingRules table and added to the CirculationRules table but
redundant code still exists in onboarding.pl. As you can see below the
maxissueqty variable is being added to the params hash which is used to make
the new issuing rule.

if ( $step == 5 ) {

    if ( $op eq 'add_validate_circ_rule' ) {

        #If no libraries exist then set the $branch value to *
        my $branch = $input->param('branch') || '*';

        my $type            = $input->param('type');
        my $branchcode      = $input->param('branch');
        my $categorycode    = $input->param('categorycode');
        my $itemtype        = $input->param('itemtype');
        my $maxissueqty     = $input->param('maxissueqty');
        my $issuelength     = $input->param('issuelength');
        my $lengthunit      = $input->param('lengthunit');
        my $renewalsallowed = $input->param('renewalsallowed');
        my $renewalperiod   = $input->param('renewalperiod');
        my $onshelfholds    = $input->param('onshelfholds') || 0;
        $maxissueqty =~ s/\s//g;
        $maxissueqty = undef if $maxissueqty !~ /^\d+/;
        $issuelength = $issuelength eq q{} ? undef : $issuelength;

        my $params = {
            branchcode      => $branchcode,
            categorycode    => $categorycode,
            itemtype        => $itemtype,
             maxissueqty     => $maxissueqty,
            renewalsallowed => $renewalsallowed,
            renewalperiod   => $renewalperiod,
            issuelength     => $issuelength,
            lengthunit      => $lengthunit,
            onshelfholds    => $onshelfholds,
        };

        my $issuingrule = Koha::IssuingRule->new($params);
        eval { $issuingrule->store; };

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list