From 28106b686e97beed54508c9a68bf9f2bfb3cfdec Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Fri, 24 May 2019 08:51:58 +0200 Subject: [PATCH] Bug 22970: Allow to change homebranch in batch add course reserves Test plan: 1. Create a course (disabled) 2. Add multiple reserves to this course using 'batch add' and set a homebranch different from the items homebranch 3. Enable the course 4. Verify that the items homebranch have changed 5. Disable the course 6. Verify that the items homebranch were reset to their initial value Depends on bug 22630 Signed-off-by: Liz Rea Signed-off-by: Katrin Fischer --- course_reserves/batch_add_items.pl | 4 ++++ .../prog/en/modules/course_reserves/batch_add_items.tt | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/course_reserves/batch_add_items.pl b/course_reserves/batch_add_items.pl index 2a924b6f35..e97991bfa7 100755 --- a/course_reserves/batch_add_items.pl +++ b/course_reserves/batch_add_items.pl @@ -37,6 +37,7 @@ my $barcodes = $cgi->param('barcodes') || q{}; my $itype = $cgi->param('itype'); my $ccode = $cgi->param('ccode'); +my $homebranch = $cgi->param('homebranch'); my $holdingbranch = $cgi->param('holdingbranch'); my $location = $cgi->param('location'); my $staff_note = $cgi->param('staff_note'); @@ -44,6 +45,7 @@ my $public_note = $cgi->param('public_note'); my $itype_enabled = scalar $cgi->param('itype_enabled') ? 1 : 0; my $ccode_enabled = scalar $cgi->param('ccode_enabled') ? 1 : 0; +my $homebranch_enabled = scalar $cgi->param('homebranch_enabled') ? 1 : 0; my $holdingbranch_enabled = scalar $cgi->param('holdingbranch_enabled') ? 1 : 0; my $location_enabled = scalar $cgi->param('location_enabled') ? 1 : 0; @@ -87,10 +89,12 @@ if ( $course_id && $course ) { itype => $itype, ccode => $ccode, holdingbranch => $holdingbranch, + homebranch => $homebranch, location => $location, itype_enabled => $itype_enabled, ccode_enabled => $ccode_enabled, holdingbranch_enabled => $holdingbranch_enabled, + homebranch_enabled => $homebranch_enabled, location_enabled => $location_enabled, ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt index aac67d138e..c6445185f7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/course_reserves/batch_add_items.tt @@ -71,6 +71,17 @@
  • + + + +
  • + +