[Koha-bugs] [Bug 35414] New: Silence warn related to number_of_copies

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Nov 28 13:58:26 CET 2023


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

            Bug ID: 35414
           Summary: Silence warn related to number_of_copies
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: trivial
          Priority: P5 - low
         Component: Cataloging
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: magnus at libriotech.no
        QA Contact: testopia at bugs.koha-community.org
                CC: m.de.rooy at rijksmuseum.nl

cataloguing/additem.pl has this code: 

my $number_of_copies           = min( scalar $input->param('number_of_copies'),
1000 ); # TODO refine hardcoded maximum?

"number_of_copies" comes from the "Add multiple copies of this item" feature.
The field for entering the number of copies defaults to empty, and this results
in this warning, from the code above: 

[WARN] Argument "" isn't numeric in subroutine entry at
/usr/share/koha/intranet/cgi-bin/cataloguing/additem.pl line 233.

We could fix this a couple of ways: 

- Make the number_of_copies field default to 1
- Fix the code, so 1 is used for number_of_copies, if the input is empty

-- 
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