From d1b81e2681156e1865a4e4091ba2ea2c4f25da7c Mon Sep 17 00:00:00 2001 From: Kevin Carnes Date: Wed, 6 Dec 2023 14:22:22 +0100 Subject: [PATCH] Bug 32392: Fix QA issues Signed-off-by: Stina Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer --- C4/Serials.pm | 4 ++-- .../includes/modals/serials_skip_issues.inc | 4 ++-- .../prog/en/modules/serials/serials-edit.tt | 22 +------------------ serials/serials-collection.pl | 2 +- 4 files changed, 6 insertions(+), 26 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index ce1b22f502..5718580413 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -835,7 +835,7 @@ sub GetNextSeq { my ( $newlastvalue1, $newlastvalue2, $newlastvalue3, $newinnerloop1, $newinnerloop2, $newinnerloop3 ); - my $count = $count_forward ? $count_forward : 1; + my $count = $count_forward || 1; if ($subscription->{'skip_serialseq'}) { my @irreg = split /;/, $subscription->{'irregularity'}; @@ -1088,7 +1088,7 @@ sub ModSerialStatus { return unless ($serialid); - my $count = $count_forward ? $count_forward : 1; + my $count = $count_forward || 1; #It is a usual serial # 1st, get previous status : diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_skip_issues.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_skip_issues.inc index 86700511a8..5bceb18010 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_skip_issues.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/modals/serials_skip_issues.inc @@ -9,12 +9,12 @@
  1. - +
- [%# subscriptionidlist is used from serials-collection, subscriptionid is used from serils-edit %] + [%# subscriptionidlist is used from serials-collection, subscriptionid is used from serials-edit %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt index 5b25284910..14c5cb2b65 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt @@ -12,26 +12,6 @@ $('#multi_receiving').on('show', function () { $(this).find(".modal-body").html($(".serials_multi_receiving")[0].outerHTML); }); - - $("form").on("submit", function(){ - let issues = $('input[name="skip_issues"]').val() ? $('input[name="skip_issues"]').val() : ''; - let too_many = _("Choose a value between 0-10 in issues to skip!"); - let no_number = _("Not a number in skip issues!"); - - if ( issues == '' || ( issues.match(/^\d+$/) && issues <= 10 ) ) { - return true; - } - else if ( issues.match(/^\d+$/) && issues > 10 ) { - alert(too_many); - return false; - } else if ( !issues.match(/^\d+$/) ) { - alert(no_number); - return false; - } - else { - return false; - } - }); }); function popup(subscriptionid) { @@ -356,7 +336,7 @@ $(document).ready(function() { [% END %] [% END %] - Skip issues: + Skip issues: [% FOREACH newserialloo IN newserialloop %] [% UNLESS ( newserialloo.subscriptionexpired ) %] diff --git a/serials/serials-collection.pl b/serials/serials-collection.pl index a5ca8b7154..025bde2179 100755 --- a/serials/serials-collection.pl +++ b/serials/serials-collection.pl @@ -47,7 +47,7 @@ my ($template, $loggedinuser, $cookie) my $biblionumber = $query->param('biblionumber'); my @subscriptionid = $query->multi_param('subscriptionid'); my $skip_issues = $query->param('skip_issues') || 0; -my $count_forward = int $skip_issues + 1; +my $count_forward = $skip_issues + 1; @subscriptionid= uniq @subscriptionid; @subscriptionid= sort @subscriptionid; -- 2.39.5