Bugzilla – Attachment 150278 Details for
Bug 31187
Regression, Permanent shelving location is always updated when editing location VIA BATCH ITEM MOD if both are mapped to MARC fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31187: Make sure to not count twice
Bug-31187-Make-sure-to-not-count-twice.patch (text/plain), 1.75 KB, created by
Jonathan Druart
on 2023-04-27 05:22:20 UTC
(
hide
)
Description:
Bug 31187: Make sure to not count twice
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-04-27 05:22:20 UTC
Size:
1.75 KB
patch
obsolete
>From f4491f801d66bcda9151d74faa262c7b5a6dfdda Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 27 Apr 2023 07:21:41 +0200 >Subject: [PATCH] Bug 31187: Make sure to not count twice > >There is another modified++ right after, we don't want to count it twice >--- > Koha/Items.pm | 1 + > t/db_dependent/Koha/Items/BatchUpdate.t | 6 ++---- > 2 files changed, 3 insertions(+), 4 deletions(-) > >diff --git a/Koha/Items.pm b/Koha/Items.pm >index 0615901fae7..390122a9e5b 100644 >--- a/Koha/Items.pm >+++ b/Koha/Items.pm >@@ -304,6 +304,7 @@ sub batch_update { > $modified++; > $new_values->{permanent_location} = $old; > $item->make_column_dirty('permanent_location'); >+ next; > } > $modified++ > if ( defined $old xor defined $new ) >diff --git a/t/db_dependent/Koha/Items/BatchUpdate.t b/t/db_dependent/Koha/Items/BatchUpdate.t >index 9fc6ff1fa21..8c728f11ab8 100755 >--- a/t/db_dependent/Koha/Items/BatchUpdate.t >+++ b/t/db_dependent/Koha/Items/BatchUpdate.t >@@ -171,8 +171,7 @@ subtest 'permanent_location' => sub { > 'location' => 'loc' > } > } >- ); >- $items->reset; >+ )->reset; > > $item = $item->get_from_storage; > is( $item->permanent_location, 'perm', 'Updated as expected when value passed'); >@@ -184,8 +183,7 @@ subtest 'permanent_location' => sub { > 'location' => 'new_loc' > } > } >- ); >- $items->reset; >+ )->reset; > > $item = $item->get_from_storage; > is( $item->permanent_location, 'perm', 'Permanent location not updated when mapped, so key present, but no value passed '); >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 31187
:
146589
|
150042
|
150046
|
150213
|
150278
|
150296
|
150597