Bug 26057: Add 'cancel' method to Koha::Item::Transfer
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 18 Dec 2020 16:36:07 +0000 (16:36 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 3 Mar 2021 14:36:13 +0000 (15:36 +0100)
commit9378fb03a7c734d15eb268d821d77737d4d5a38e
treef1a4d4a018aaf43ca0df5c69de0d517eec506d87
parent3d0006f7722fcb2a769e276171da269d92ddce76
Bug 26057: Add 'cancel' method to Koha::Item::Transfer

This patch adds the 'cancel' method to Koha::Item::Transfer which sets
the transfer as cancelled by updating the datecancelled field. We also
update Koha::Item->get_transfer here to accomodate for the new
resolution available for a transfer.

Test plan:
1/ Run the included unit tests additions (t/db_dependent/Koha/Items.t,
t/db_dependent/Koha/Item/Transfer.t

Signed-off-by: Kathleen Milne <kathleen.milne@cne-siar.gov.uk>
Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Exceptions/Item/Transfer.pm
Koha/Item.pm
Koha/Item/Transfer.pm
t/db_dependent/Koha/Item/Transfer.t
t/db_dependent/Koha/Items.t