Bugzilla – Attachment 118294 Details for
Bug 27963
touch_all_items.pl script is not working at all
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl
Bug-27963-bug-23463-follow-up-Fix-touchallitemspl.patch (text/plain), 1.34 KB, created by
Jonathan Druart
on 2021-03-16 10:38:55 UTC
(
hide
)
Description:
Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-03-16 10:38:55 UTC
Size:
1.34 KB
patch
obsolete
>From fc0bf57c9ade088441d7e8dc00039be811d10a8f Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 Mar 2021 11:36:17 +0100 >Subject: [PATCH] Bug 27963: (bug 23463 follow-up) Fix touch_all_items.pl > >This script is used to fix inconsistencies in the items table. Prior to >bug 23463, ModItem dealt with that. > >We need to make some attributes as dirty to make sure the >Koha::Item->store method will fix them. > >Test plan: >Be familiar with how touch_all_items is supposed to work and confirm >that the different inconsistencies are fixed. >--- > misc/maintenance/touch_all_items.pl | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/misc/maintenance/touch_all_items.pl b/misc/maintenance/touch_all_items.pl >index 648190502e..b3d8d536fe 100755 >--- a/misc/maintenance/touch_all_items.pl >+++ b/misc/maintenance/touch_all_items.pl >@@ -83,8 +83,12 @@ $sth_fetch->execute(); > > # fetch info from the search > while (my ($biblionumber, $itemnumber, $itemcallnumber) = $sth_fetch->fetchrow_array){ >- >- eval { Koha::Items->find($itemnumber)->itemcallnumber($itemcallnumber)->store; }; >+ >+ my $item = Koha::Items->find($itemnumber); >+ for my $c (qw( itemcallnumber cn_source location ) ){ >+ $item->make_column_dirty($c); >+ } >+ eval { $item->store; }; > my $modok = $@ ? 0 : 1; > > if ($modok) { >-- >2.20.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 27963
:
118294
|
118328
|
118333
|
118334
|
118703