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. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> (cherry picked from commit8f071b01f5) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit8244792f26) Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
This commit is contained in:
parent
60bb013164
commit
d373a884bf
|
|
@ -83,8 +83,15 @@ $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);
|
||||
next unless $item;
|
||||
|
||||
for my $c (qw( itemcallnumber cn_source ) ){
|
||||
$item->make_column_dirty($c);
|
||||
}
|
||||
|
||||
eval { $item->store };
|
||||
my $modok = $@ ? 0 : 1;
|
||||
|
||||
if ($modok) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue