Bug 12362: Add 'TransferCancellation' as a transfer reason

This patch adds the database update to add 'TransferCancellation' as a
reason for transfer.

Signed-off-by: Petro Vashchuk <stalkernoid@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Martin Renvoize 2021-03-22 14:43:42 +00:00 committed by Jonathan Druart
parent 6c9d15ba49
commit 2c04cc02cc
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,26 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
# Add reserve reasons enum
$dbh->do(
qq{
ALTER TABLE
`branchtransfers`
MODIFY COLUMN
`reason` enum(
'Manual',
'StockrotationAdvance',
'StockrotationRepatriation',
'ReturnToHome',
'ReturnToHolding',
'RotatingCollection',
'Reserve',
'LostReserve',
'CancelReserve',
'TransferCancellation'
)
AFTER `comments`
}
);
NewVersion( $DBversion, 12362, "Add 'TransferCancellion' reason to branchtransfers enum");
}

View file

@ -1530,7 +1530,7 @@ CREATE TABLE `branchtransfers` (
`datecancelled` datetime default NULL COMMENT 'the date the transfer was cancelled',
`tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
`comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
`reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
`reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve', 'TransferCancellation') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
`cancellation_reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'ItemLost') default NULL COMMENT 'what triggered the transfer cancellation',
PRIMARY KEY (`branchtransfer_id`),
KEY `frombranch` (`frombranch`),