Bug 31179: Don't copy invisible subfields when duplicating items
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 19 Jul 2022 14:09:46 +0000 (16:09 +0200)
committerLucas Gass <lucas@bywatersolutions.com>
Fri, 12 Aug 2022 14:29:34 +0000 (14:29 +0000)
commit210a62cc3d6db48888c8c6e8ea1aaa7f4017202c
tree0a943c2ee81b3027d2587c186187ae08047215df
parentb96e6dd2efd06099c16f11d6057ae98a9c698619
Bug 31179: Don't copy invisible subfields when duplicating items

Duplicate item is intended to duplicate the visible cataloging fields of an item, however,
currently it is duplicating the complete internal record of the item

To recreate:
1 - find an item in Koha staff client, copy the barcode
2 - Issue this item to a patron
3 - Return to the record
4 - Edit items
5 - Click 'Actions->Duplicate' for the item in question
6 - Save the item
7 - Note in the items table above for that 'Total checkouts' 'Due date'
 etc. have not been copied to new item

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit b90787d5c8167b455cfd24e8cc24384c3ee70081)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Koha/UI/Form/Builder/Item.pm
cataloguing/additem.pl
t/db_dependent/Koha/UI/Form/Builder/Item.t