From 5ae16393d49dfb61aa57d3da6a3560789fc56727 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Thu, 13 Feb 2020 02:47:20 +0000 Subject: [PATCH] Bug 22655: Adding holds rules to Onboarding tool This patch adds the following fields to the circ rule step in the onboarding tool: - holds allowed (total) - holds allowed (daily) - holds per record (count) To test: 1) Apply patch, drop and recreate database, restart memcached and refresh page 2) Go through the installer and get to the final step of the onboarding tool 3) Confirm the above fields are now available to set in your circulation rule 4) Save and log in to Koha 5) Go to Admin -> Circ and fines rules 6) Confirm the fields saved correctly Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize --- installer/onboarding.pl | 9 ++++++--- .../en/modules/onboarding/onboardingstep5.tt | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/installer/onboarding.pl b/installer/onboarding.pl index ab07d52021..547df29e0d 100755 --- a/installer/onboarding.pl +++ b/installer/onboarding.pl @@ -242,6 +242,9 @@ if ( $step == 5 ) { my $lengthunit = $input->param('lengthunit'); my $renewalsallowed = $input->param('renewalsallowed'); my $renewalperiod = $input->param('renewalperiod'); + my $reservesallowed = $input->param('reservesallowed'); + my $holds_per_day = $input->param('holds_per_day'); + my $holds_per_record = $input->param('holds_per_record'); my $onshelfholds = $input->param('onshelfholds') || 0; $maxissueqty =~ s/\s//g; $maxissueqty = undef if $maxissueqty !~ /^\d+/; @@ -267,8 +270,8 @@ if ( $step == 5 ) { firstremind => 0, hardduedate => "", hardduedatecompare => -1, - holds_per_day => undef, - holds_per_record => 1, + holds_per_day => $holds_per_day, + holds_per_record => $holds_per_record, maxissueqty => "", maxonsiteissueqty => "", maxsuspensiondays => "", @@ -278,7 +281,7 @@ if ( $step == 5 ) { opacitemholds => "N", overduefinescap => "", rentaldiscount => 0, - reservesallowed => 0, + reservesallowed => $reservesallowed, suspension_chargeperiod => undef, } }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt index b04013e951..b559255591 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/onboarding/onboardingstep5.tt @@ -109,6 +109,21 @@ Required +
  • + + +
  • + +
  • + + +
  • + +
  • + + +
  • +