From 18cb9e0fbbe3cb24fd01705069571111eef2c21f Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 14 Feb 2022 15:38:25 +0100 Subject: [PATCH] Bug 30095: Add "warn when late" to subscriptions batch mod tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch depends on bug 29996 Test plan: 1. On the Serials module main page, do a search that return at least 2 subscriptions 2. Check at least 2 boxes in the first column of the table, then click on "Edit selected serials" above the table 3. Verify that the table above the form display correct data for the "Warn when late" column 4. Submit the form without changing anything. Verify that the setting "warn when late" was not changed for selected subscriptions 5. Repeat steps 1 and 2. Set "Warn when late" to "No" and submit the form. Verify that the setting "warn when late" was changed to "No" for all selected subscriptions 6. Repeat steps 1 and 2. Set "Warn when late" to "Yes" and submit the form. Verify that the setting "warn when late" was changed to "Yes" for all selected subscriptions Sponsored-by: Écoles Nationales Supérieures d'Architecture --- .../en/modules/serials/subscription-batchedit.tt | 16 ++++++++++++++++ serials/subscription-batchedit.pl | 1 + 2 files changed, 17 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt index 809f8a0133..049e141fa2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-batchedit.tt @@ -53,6 +53,7 @@ Nonpublic notes Call number Create item when receiving + Warn when late Expiration date @@ -75,6 +76,13 @@ No [% END %] + + [% IF subscription.warn_when_late %] + Yes + [% ELSE %] + No + [% END %] + [% subscription.enddate | $KohaDates %] [% END %] @@ -145,6 +153,14 @@ +
  • + + +
  • diff --git a/serials/subscription-batchedit.pl b/serials/subscription-batchedit.pl index 676905cbba..b1b7e7f909 100755 --- a/serials/subscription-batchedit.pl +++ b/serials/subscription-batchedit.pl @@ -61,6 +61,7 @@ if ( $op eq 'cud-batchedit' ) { notes => scalar $cgi->param('notes'), internalnotes => scalar $cgi->param('internalnotes'), serialsadditems => scalar $cgi->param('serialsadditems'), + warn_when_late => scalar $cgi->param('warn_when_late'), ); # If we convert a blank string we get todays date, we should only convert enddate if it is not blank $params{'enddate'} = dt_from_string( scalar $cgi->param('enddate') ) if $cgi->param('enddate'); -- 2.39.2