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

(-)a/Koha/Schema/Result/Branchtransfer.pm (-3 / +6 lines)
Lines 72-78 __PACKAGE__->table("branchtransfers"); Link Here
72
=head2 reason
72
=head2 reason
73
73
74
  data_type: 'enum'
74
  data_type: 'enum'
75
  extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection"]}
75
  extra: {list => ["Manual","StockrotationAdvance","StockrotationRepatriation","ReturnToHome","ReturnToHolding","RotatingCollection","Reserve","LostReserve","CancelReserve"]}
76
  is_nullable: 1
76
  is_nullable: 1
77
77
78
=cut
78
=cut
Lines 128-133 __PACKAGE__->add_columns( Link Here
128
        "ReturnToHome",
128
        "ReturnToHome",
129
        "ReturnToHolding",
129
        "ReturnToHolding",
130
        "RotatingCollection",
130
        "RotatingCollection",
131
        "Reserve",
132
        "LostReserve",
133
        "CancelReserve",
131
      ],
134
      ],
132
    },
135
    },
133
    is_nullable => 1,
136
    is_nullable => 1,
Lines 194-201 __PACKAGE__->belongs_to( Link Here
194
);
197
);
195
198
196
199
197
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-20 10:50:34
200
# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-20 11:24:33
198
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z5PcwyW+X3XM1CeO6CZKBw
201
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:50FpCj6vWH5O8MThCy/1hA
199
202
200
sub koha_object_class {
203
sub koha_object_class {
201
    'Koha::Item::Transfer';
204
    'Koha::Item::Transfer';
(-)a/installer/data/mysql/atomicupdate/bug_24436.perl (+27 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
4
    # Add reserve reasons enum
5
    $dbh->do(
6
        qq{
7
            ALTER TABLE
8
                `branchtransfers`
9
            MODIFY COLUMN
10
                `reason` enum(
11
                    'Manual',
12
                    'StockrotationAdvance',
13
                    'StockrotationRepatriation',
14
                    'ReturnToHome',
15
                    'ReturnToHolding',
16
                    'RotatingCollection',
17
                    'Reserve',
18
                    'LostReserve',
19
                    'CancelReserve'
20
                )
21
            AFTER `comments`
22
          }
23
    );
24
25
    SetVersion( $DBversion );
26
    print "Upgrade to $DBversion done (Bug 24299 - Add 'reserve' reasons to branchtransfers enum)\n";
27
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +1 lines)
Lines 906-912 CREATE TABLE `branchtransfers` ( -- information for items that are in transit be Link Here
906
  `datearrived` datetime default NULL, -- the date the transfer arrived at its destination
906
  `datearrived` datetime default NULL, -- the date the transfer arrived at its destination
907
  `tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to
907
  `tobranch` varchar(10) NOT NULL default '', -- the branch the transfer was going to
908
  `comments` LONGTEXT, -- any comments related to the transfer
908
  `comments` LONGTEXT, -- any comments related to the transfer
909
  `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection'), -- what triggered the transfer
909
  `reason` ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve'), -- what triggered the transfer
910
  PRIMARY KEY (`branchtransfer_id`),
910
  PRIMARY KEY (`branchtransfer_id`),
911
  KEY `frombranch` (`frombranch`),
911
  KEY `frombranch` (`frombranch`),
912
  KEY `tobranch` (`tobranch`),
912
  KEY `tobranch` (`tobranch`),
913
- 

Return to bug 24436