From 64443db3ce6529defecfcb2e01712d75aaae5059 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Wed, 15 Jan 2020 15:27:56 +0000 Subject: [PATCH] Bug 24423: Add biblionumber to modify items link To test: - Find/create a bib with at least one item - From detail.pl, use the checkboxes in the holdings table to select one or more items - click the "Modify Selected Items" link just above the holdings table to take your item(s) to batch modification - Change something and click save - Observe that the Return to the Record link points to a url without a biblionumber: "/cgi-bin/koha/catalogue/detail.pl?biblionumber=" - Apply patch - Repeat - The link now works! Signed-off-by: Nick Clemens Signed-off-by: David Nind Bug 24423: Fix for deletion - cleanup accidental debug inclusiopm To test: Repeat prior test plan with 'Delete selected' Signed-off-by: Marcel de Rooy Signed-off-by: Martin Renvoize Signed-off-by: Joy Nelson (cherry picked from commit a1479015edfe2ba14c67090dea2c682ef5c3f48f) Signed-off-by: Lucas Gass (cherry picked from commit 33d60b305e94afdd6f2584707f4b10516f513810) Signed-off-by: Hayley Mapley --- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 2 ++ tools/batchMod.pl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 93c35b38dd..40b76526e1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -975,6 +975,7 @@ if (itemnumbers.length > 0) { var url = '/cgi-bin/koha/tools/batchMod.pl?op=show&del=1'; url += '&itemnumber=' + itemnumbers.join('&itemnumber='); + url += '&biblionumber=[% biblionumber | uri %]'; url += '&src=CATALOGUING'; $('a.itemselection_action_delete').attr('href', url); } else { @@ -991,6 +992,7 @@ if (itemnumbers.length > 0) { var url = '/cgi-bin/koha/tools/batchMod.pl?op=show'; url += '&itemnumber=' + itemnumbers.join('&itemnumber='); + url += '&biblionumber=[% biblionumber | uri %]'; url += '&src=CATALOGUING'; $('a.itemselection_action_modify').attr('href', url); } else { diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 297c6ce743..1b7de4f4af 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -267,7 +267,7 @@ if ($op eq "show"){ @notfounditemnumbers = grep { !$exists{$_} } @contentlist; } } else { - if (defined $biblionumber){ + if (defined $biblionumber && !@itemnumbers){ my @all_items = GetItemsInfo( $biblionumber ); foreach my $itm (@all_items) { push @itemnumbers, $itm->{itemnumber}; -- 2.39.5