Bugzilla – Attachment 154661 Details for
Bug 25393
Create separate 'no automatic renewal before' rule
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25393: Add new noautorenewalbefore circulation rule
Bug-25393-Add-new-noautorenewalbefore-circulation-.patch (text/plain), 8.45 KB, created by
Andrew Fuerste-Henry
on 2023-08-18 15:50:05 UTC
(
hide
)
Description:
Bug 25393: Add new noautorenewalbefore circulation rule
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2023-08-18 15:50:05 UTC
Size:
8.45 KB
patch
obsolete
>From c13ba32d5ca35d0ab3c55f9b23eb298335a3fe0d Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Thu, 10 Aug 2023 15:44:05 +0000 >Subject: [PATCH] Bug 25393: Add new noautorenewalbefore circulation rule > >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > Koha/CirculationRules.pm | 3 +++ > admin/smart-rules.pl | 4 ++++ > installer/onboarding.pl | 1 + > .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 7 ++++++- > 4 files changed, 14 insertions(+), 1 deletion(-) > >diff --git a/Koha/CirculationRules.pm b/Koha/CirculationRules.pm >index c29b83d0413..6f76053ae7f 100644 >--- a/Koha/CirculationRules.pm >+++ b/Koha/CirculationRules.pm >@@ -155,6 +155,9 @@ our $RULE_KINDS = { > norenewalbefore => { > scope => [ 'branchcode', 'categorycode', 'itemtype' ], > }, >+ noautorenewalbefore => { >+ scope => [ 'branchcode', 'categorycode', 'itemtype' ], >+ }, > onshelfholds => { > scope => [ 'branchcode', 'categorycode', 'itemtype' ], > }, >diff --git a/admin/smart-rules.pl b/admin/smart-rules.pl >index d073bda5d5d..68d28c321e4 100755 >--- a/admin/smart-rules.pl >+++ b/admin/smart-rules.pl >@@ -96,6 +96,7 @@ if ($op eq 'delete') { > unseen_renewals_allowed => undef, > renewalperiod => undef, > norenewalbefore => undef, >+ noautorenewalbefore => undef, > auto_renew => undef, > no_auto_renewal_after => undef, > no_auto_renewal_after_hard_limit => undef, >@@ -268,6 +269,8 @@ elsif ($op eq 'add') { > my $renewalperiod = $input->param('renewalperiod'); > my $norenewalbefore = $input->param('norenewalbefore'); > $norenewalbefore = q{} if $norenewalbefore =~ /^\s*$/; >+ my $noautorenewalbefore = $input->param('noautorenewalbefore'); >+ $noautorenewalbefore = q{} if $noautorenewalbefore =~ /^\s*$/; > my $auto_renew = $input->param('auto_renew') eq 'yes' ? 1 : 0; > my $no_auto_renewal_after = $input->param('no_auto_renewal_after'); > $no_auto_renewal_after = q{} if $no_auto_renewal_after =~ /^\s*$/; >@@ -316,6 +319,7 @@ elsif ($op eq 'add') { > unseen_renewals_allowed => $unseen_renewals_allowed, > renewalperiod => $renewalperiod, > norenewalbefore => $norenewalbefore, >+ noautorenewalbefore => $noautorenewalbefore, > auto_renew => $auto_renew, > no_auto_renewal_after => $no_auto_renewal_after, > no_auto_renewal_after_hard_limit => $no_auto_renewal_after_hard_limit, >diff --git a/installer/onboarding.pl b/installer/onboarding.pl >index 68a1345df1e..cf4b38c1f74 100755 >--- a/installer/onboarding.pl >+++ b/installer/onboarding.pl >@@ -269,6 +269,7 @@ if ( $step == 5 ) { > no_auto_renewal_after => "", > no_auto_renewal_after_hard_limit => "", > norenewalbefore => "", >+ noautorenewalbefore => "", > opacitemholds => "N", > overduefinescap => "", > rentaldiscount => 0, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >index 96ec772e940..ca12fddf402 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt >@@ -137,6 +137,7 @@ > [% END %] > <th>Renewal period</th> > <th>No renewal before</th> >+ <th>No automatic renewal before</th> > <th>Automatic renewal</th> > <th>No automatic renewal after</th> > <th>No automatic renewal after (hard limit)</th> >@@ -187,6 +188,7 @@ > [% SET unseenrenewalsallowed = all_rules.$c.$i.unseen_renewals_allowed %] > [% SET renewalperiod = all_rules.$c.$i.renewalperiod %] > [% SET norenewalbefore = all_rules.$c.$i.norenewalbefore %] >+ [% SET noautorenewalbefore = all_rules.$c.$i.noautorenewalbefore %] > [% SET auto_renew = all_rules.$c.$i.auto_renew %] > [% SET no_auto_renewal_after = all_rules.$c.$i.no_auto_renewal_after %] > [% SET no_auto_renewal_after_hard_limit = all_rules.$c.$i.no_auto_renewal_after_hard_limit %] >@@ -205,7 +207,7 @@ > [% SET recall_overdue_fine = all_rules.$c.$i.recall_overdue_fine %] > [% SET recall_shelf_time = all_rules.$c.$i.recall_shelf_time %] > >- [% SET show_rule = note || maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || unseenrenewalsallowed || renewalperiod || norenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount || decreaseloanholds || recalls_allowed || recalls_per_record || on_shelf_recalls || recall_due_date_interval || recall_overdue_fine || recall_shelf_time %] >+ [% SET show_rule = note || maxissueqty || maxonsiteissueqty || issuelength || daysmode || lengthunit || hardduedate || hardduedatecompare || fine || chargeperiod || chargeperiod_charge_at || firstremind || overduefinescap || cap_fine_to_replacement_price || finedays || maxsuspensiondays || suspension_chargeperiod || renewalsallowed || unseenrenewalsallowed || renewalperiod || norenewalbefore || noautorenewalbefore || auto_renew || no_auto_renewal_after || no_auto_renewal_after_hard_limit || reservesallowed || holds_per_day || holds_per_record || onshelfholds || opacitemholds || article_requests || rentaldiscount || decreaseloanholds || recalls_allowed || recalls_per_record || on_shelf_recalls || recall_due_date_interval || recall_overdue_fine || recall_shelf_time %] > [% IF show_rule %] > [% SET row_count = row_count + 1 %] > <tr row_countd="row_[% row_count | html %]"> >@@ -319,6 +321,7 @@ > [% END %] > <td>[% renewalperiod | html %]</td> > <td>[% norenewalbefore | html %]</td> >+ <td>[% noautorenewalbefore | html %]</td> > <td data-code="[%- IF auto_renew -%]yes[%- ELSE -%]no[%- END -%]"> > [% IF auto_renew %] > <span>Yes</span> >@@ -487,6 +490,7 @@ > [% END %] > <td><input type="text" name="renewalperiod" id="renewalperiod" size="3" /></td> > <td><input type="text" name="norenewalbefore" id="norenewalbefore" size="3" /></td> >+ <td><input type="text" name="noautorenewalbefore" id="noautorenewalbefore" size="3" /></td> > <td> > <select name="auto_renew" id="auto_renew"> > <option value="no" selected>No</option> >@@ -576,6 +580,7 @@ > [% END %] > <th>Renewal period</th> > <th>No renewal before</th> >+ <th>No automatic renewal before</th> > <th>Automatic renewal</th> > <th>No automatic renewal after</th> > <th>No automatic renewal after (hard limit)</th> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 25393
:
154533
|
154534
|
154535
|
154536
|
154537
|
154538
|
154539
|
154540
|
154541
|
154661
|
154662
|
154663
|
154664
|
154665
|
154666
|
154667
|
154668
|
154669
|
155307
|
155308
|
155309
|
155310
|
155311
|
155312
|
155313
|
155314
|
155315
|
156829
|
156830
|
156831
|
156832
|
156833
|
156834
|
156835
|
156836
|
156837
|
156838
|
156839
|
156840