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

(-)a/installer/data/mysql/atomicupdate/bug_30924.pl (+16 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number  => 30924,
5
    description => "Add missing RecallCancellation option to branchtransfers.reason ENUM",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh) = @$args{qw(dbh)};
9
10
        # Add RecallCancellation ENUM option to branchtransfers.reason
11
        $dbh->do(q{
12
            ALTER TABLE branchtransfers MODIFY COLUMN reason
13
            ENUM('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall','RecallCancellation') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer'
14
        });
15
    },
16
};
(-)a/installer/data/mysql/kohastructure.sql (-1 / +1 lines)
Lines 1566-1572 CREATE TABLE `branchtransfers` ( Link Here
1566
  `datecancelled` datetime DEFAULT NULL COMMENT 'the date the transfer was cancelled',
1566
  `datecancelled` datetime DEFAULT NULL COMMENT 'the date the transfer was cancelled',
1567
  `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
1567
  `tobranch` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'the branch the transfer was going to',
1568
  `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
1568
  `comments` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'any comments related to the transfer',
1569
  `reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
1569
  `reason` ENUM('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','TransferCancellation','Recall','RecallCancellation') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer',
1570
  `cancellation_reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost','WrongTransfer','CancelRecall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation',
1570
  `cancellation_reason` enum('Manual','StockrotationAdvance','StockrotationRepatriation','ReturnToHome','ReturnToHolding','RotatingCollection','Reserve','LostReserve','CancelReserve','ItemLost','WrongTransfer','CancelRecall') COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'what triggered the transfer cancellation',
1571
  PRIMARY KEY (`branchtransfer_id`),
1571
  PRIMARY KEY (`branchtransfer_id`),
1572
  KEY `frombranch` (`frombranch`),
1572
  KEY `frombranch` (`frombranch`),
(-)a/recalls/recalls_to_pull.pl (-1 / +4 lines)
Lines 40-46 my $recall_id = $query->param('recall_id'); Link Here
40
if ( $op eq 'cancel' ) {
40
if ( $op eq 'cancel' ) {
41
    my $recall = Koha::Recalls->find( $recall_id );
41
    my $recall = Koha::Recalls->find( $recall_id );
42
    if ( $recall->in_transit ) {
42
    if ( $recall->in_transit ) {
43
        C4::Items::ModItemTransfer( $recall->item->itemnumber, $recall->item->holdingbranch, $recall->item->homebranch, 'CancelRecall' );
43
        C4::Items::ModItemTransfer(
44
            $recall->item->itemnumber, $recall->item->holdingbranch,
45
            $recall->item->homebranch, 'RecallCancellation'
46
        );
44
    }
47
    }
45
    $recall->set_cancelled;
48
    $recall->set_cancelled;
46
    $op = 'list';
49
    $op = 'list';
(-)a/svc/recall (-2 / +4 lines)
Lines 78-84 if ( $op eq 'cancel' ) { Link Here
78
} elsif ( $op eq 'transit' ) {
78
} elsif ( $op eq 'transit' ) {
79
    # cancel recall and return item to home library
79
    # cancel recall and return item to home library
80
    if ( $recall->in_transit ) {
80
    if ( $recall->in_transit ) {
81
        C4::Items::ModItemTransfer( $recall->item->itemnumber, $recall->item->holdingbranch, $recall->item->homebranch, 'CancelRecall' );
81
        C4::Items::ModItemTransfer(
82
            $recall->item->itemnumber, $recall->item->holdingbranch,
83
            $recall->item->homebranch, 'RecallCancellation'
84
        );
82
    }
85
    }
83
    $recall->set_cancelled;
86
    $recall->set_cancelled;
84
    if ( $recall->cancelled ){
87
    if ( $recall->cancelled ){
85
- 

Return to bug 30924