View | Details | Raw Unified | Return to bug 31187
Collapse All | Expand All

(-)a/Koha/Items.pm (+1 lines)
Lines 304-309 sub batch_update { Link Here
304
                    $modified++;
304
                    $modified++;
305
                    $new_values->{permanent_location} = $old;
305
                    $new_values->{permanent_location} = $old;
306
                    $item->make_column_dirty('permanent_location');
306
                    $item->make_column_dirty('permanent_location');
307
                    next;
307
                }
308
                }
308
                $modified++
309
                $modified++
309
                  if ( defined $old xor defined $new )
310
                  if ( defined $old xor defined $new )
(-)a/t/db_dependent/Koha/Items/BatchUpdate.t (-5 / +2 lines)
Lines 171-178 subtest 'permanent_location' => sub { Link Here
171
                'location'           => 'loc'
171
                'location'           => 'loc'
172
            }
172
            }
173
        }
173
        }
174
    );
174
    )->reset;
175
    $items->reset;
176
175
177
    $item = $item->get_from_storage;
176
    $item = $item->get_from_storage;
178
    is( $item->permanent_location, 'perm', 'Updated as expected when value passed');
177
    is( $item->permanent_location, 'perm', 'Updated as expected when value passed');
Lines 184-191 subtest 'permanent_location' => sub { Link Here
184
                'location'           => 'new_loc'
183
                'location'           => 'new_loc'
185
            }
184
            }
186
        }
185
        }
187
    );
186
    )->reset;
188
    $items->reset;
189
187
190
    $item = $item->get_from_storage;
188
    $item = $item->get_from_storage;
191
    is( $item->permanent_location, 'perm', 'Permanent location not updated when mapped, so key present, but no value passed ');
189
    is( $item->permanent_location, 'perm', 'Permanent location not updated when mapped, so key present, but no value passed ');
192
- 

Return to bug 31187