From 18d42db176d5fd29ddd07b4fc8b93a378087ffc5 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 Signed-off-by: Jonathan Druart --- .../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 0d3c7a3b92..1f1786ea0e 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 2a499796e5..18214ac2fb 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -232,10 +232,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]; @@ -293,16 +297,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.39.5