Bug 34146: Counterpart for serials-edit
Not only additem suffers from it. We can do the same with serials-edit. This patch adds a server-side and client-side check as we did for additem. Test plan: Receive serial with adding items. Try to add more than 999 items in number of copies. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> (cherry picked from commitf88d2e7983
) Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> (cherry picked from commit505b4354a9
) Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
parent
83346c7154
commit
ed927b6eb9
2 changed files with 4 additions and 3 deletions
|
@ -286,7 +286,7 @@ $(document).ready(function() {
|
|||
|
||||
<hr>
|
||||
<div class="subfield_line">
|
||||
<label for="number_of_copies">Number of copies to be made of this item </label> <input type="text" id="number_of_copies[% newserialloo.serialid | html %][% newserialloo.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]" name="number_of_copies" value="1" size="2"> <span class="hint">The barcode you enter will be incremented for each additional item.</p>
|
||||
<label for="number_of_copies">Number of copies to be made of this item </label> <input type="text" id="number_of_copies[% newserialloo.serialid | html %][% newserialloo.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]" name="number_of_copies" value="1" maxlength="3" size="2"> <span class="hint">Number of copies limited to under 1000. The barcode you enter will be incremented for each additional item.</p>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="moditem" value="" />
|
||||
|
@ -437,7 +437,7 @@ $(document).ready(function() {
|
|||
|
||||
<hr>
|
||||
<div class="subfield_line">
|
||||
<label for="number_of_copies">Number of copies to be made of this item </label> <input type="text" id="number_of_copies[% newserialloo.serialid | html %][% newserialloo.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]" name="number_of_copies" value="1" size="2"> <span class="hint">The barcode you enter will be incremented for each additional item.</p>
|
||||
<label for="number_of_copies">Number of copies to be made of this item </label> <input type="text" id="number_of_copies[% newserialloo.serialid | html %][% newserialloo.countitems | html %][% iteminformatio.subfield | html %][% iteminformatio.random | html %]" name="number_of_copies" value="1" maxlength="3" size="2"> <span class="hint">Number of copies limited to under 1000. The barcode you enter will be incremented for each additional item.</p>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="moditem" value="" />
|
||||
|
|
|
@ -77,6 +77,7 @@ use Koha::Items;
|
|||
use Koha::Serial::Items;
|
||||
|
||||
use List::MoreUtils qw( uniq );
|
||||
use List::Util qw( min );
|
||||
|
||||
my $query = CGI->new();
|
||||
my $dbh = C4::Context->dbh;
|
||||
|
@ -277,7 +278,7 @@ if ( $op and $op eq 'serialchangestatus' ) {
|
|||
my @serials = $query->multi_param('serial');
|
||||
my @bibnums = $query->multi_param('bibnum');
|
||||
my @itemid = $query->multi_param('itemid');
|
||||
my @num_copies = $query->multi_param('number_of_copies');
|
||||
my @num_copies = map { min($_, 1000); } $query->multi_param('number_of_copies');
|
||||
|
||||
#Rebuilding ALL the data for items into a hash
|
||||
# parting them on $itemid.
|
||||
|
|
Loading…
Reference in a new issue