@@ -, +, @@ - 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! --- Koha/SearchEngine/Elasticsearch/Search.pm | 1 + koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt | 1 + tools/batchMod.pl | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) --- a/Koha/SearchEngine/Elasticsearch/Search.pm +++ a/Koha/SearchEngine/Elasticsearch/Search.pm @@ -93,6 +93,7 @@ sub search { $page = (!defined($page) || ($page <= 0)) ? 0 : $page - 1; $query->{from} = $page * $query->{size}; } + warn Data::Dumper::Dumper( $query ); my $elasticsearch = $self->get_elasticsearch(); my $results = eval { $elasticsearch->search( --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -904,6 +904,7 @@ Note that permanent location is a code, and location may be an authval. 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 { --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -318,7 +318,7 @@ if ($op eq "show"){ @notfounditemnumbers = grep { !exists $itemdata{$_} } @contentlist; } } else { - if (defined $biblionumber){ + if (defined $biblionumber && !@itemnumbers){ my @all_items = GetItemsInfo( $biblionumber ); foreach my $itm (@all_items) { push @itemnumbers, $itm->{itemnumber}; --