From cae6d1297bb848811d8ac299e9d44fcfb3428db0 Mon Sep 17 00:00:00 2001 From: Agustin Moyano Date: Thu, 6 Aug 2020 15:54:49 -0300 Subject: [PATCH] Bug 19889: (follow-up) Fix overlapping blue box and message in batch item modification Signed-off-by: Nick Clemens --- .../prog/en/modules/catalogue/moredetail.tt | 5 +++- tools/batchMod.pl | 28 ++++++++++++---------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index a9d4830f75..8028f261f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -50,8 +50,11 @@ + [% IF ONLY_ONE || updated_exclude_from_local_holds_priority.defined %] +
+ [% END %] + [% IF ( ONLY_ONE ) %] -
You are only viewing one item. View All
[% END %] diff --git a/tools/batchMod.pl b/tools/batchMod.pl index 672d1d5ded..b8eeef240b 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -231,10 +231,14 @@ if ($op eq "action") { } } else { - $item->exclude_from_local_holds_priority($exclude_from_local_holds_priority)->store if defined $exclude_from_local_holds_priority; + my $modified_holds_priority = 0; + if (defined $exclude_from_local_holds_priority && $item->exclude_from_local_holds_priority != $exclude_from_local_holds_priority) { + $item->exclude_from_local_holds_priority($exclude_from_local_holds_priority)->store; + $modified_holds_priority = 1; + } + my $modified = 0; if ( $values_to_modify || $values_to_blank ) { my $localmarcitem = Item2Marc($itemdata); - my $modified = 0; for ( my $i = 0 ; $i < @tags ; $i++ ) { my $search = $searches[$i]; @@ -292,16 +296,16 @@ if ($op eq "action") { } }; } - if ($runinbackground) { - $modified_items++ if $modified; - $modified_fields += $modified; - $job->set( - { - modified_items => $modified_items, - modified_fields => $modified_fields, - } - ); - } + } + if ($runinbackground) { + $modified_items++ if $modified || $modified_holds_priority; + $modified_fields += $modified + $modified_holds_priority; + $job->set( + { + modified_items => $modified_items, + modified_fields => $modified_fields, + } + ); } } $i++; -- 2.11.0