Lines 3-9
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
Link Here
|
3 |
|
3 |
|
4 |
return { |
4 |
return { |
5 |
bug_number => "37344", |
5 |
bug_number => "37344", |
6 |
description => "Add columns cancellation_reason and cancellation_date to discharge", |
6 |
description => "Add columns cancellation_reason and cancelled to discharge", |
7 |
up => sub { |
7 |
up => sub { |
8 |
my ($args) = @_; |
8 |
my ($args) = @_; |
9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
9 |
my ( $dbh, $out ) = @$args{qw(dbh out)}; |
Lines 14-20
return {
Link Here
|
14 |
q{ |
14 |
q{ |
15 |
ALTER TABLE discharges |
15 |
ALTER TABLE discharges |
16 |
ADD COLUMN cancelled timestamp NULL default NULL, |
16 |
ADD COLUMN cancelled timestamp NULL default NULL, |
17 |
ADD COLUMN cancellation_reason VARCHAR(80) NULL default NULL; |
17 |
ADD COLUMN cancellation_reason VARCHAR(80) NULL default NULL ; |
18 |
} |
18 |
} |
19 |
); |
19 |
); |
20 |
|
20 |
|
Lines 27-34
return {
Link Here
|
27 |
$dbh->do( |
27 |
$dbh->do( |
28 |
q{ |
28 |
q{ |
29 |
INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES |
29 |
INSERT IGNORE INTO authorised_values (category, authorised_value, lib) VALUES |
30 |
('DISCHARGE_CANCELLATION','BORROWER_MISTAKE', 'Borrower asked a discharge by mistake'), |
30 |
('DISCHARGE_CANCELLATION','PATRON_MISTAKE', 'Patron asked a discharge by mistake'), |
31 |
('DISCHARGE_CANCELLATION','BORROWER_STILL_NEEDS_TO_BORROW','Administration required a discharge however the borrower still needs to borrow') |
31 |
('DISCHARGE_CANCELLATION','PATRON_STILL_NEEDS_ACCOUNT','Administration required a discharge however the patron still needs to use their account') |
32 |
} |
32 |
} |
33 |
); |
33 |
); |
34 |
|
34 |
|
Lines 36-43
return {
Link Here
|
36 |
# tables |
36 |
# tables |
37 |
say $out "Added column 'discharges.cancelled'"; |
37 |
say $out "Added column 'discharges.cancelled'"; |
38 |
say $out "Added column 'discharges.cancellation_reason'"; |
38 |
say $out "Added column 'discharges.cancellation_reason'"; |
39 |
say $out "Added authorized values"; |
39 |
say $out "Added authorized value category DISCHARGE_CANCELLATION"; |
40 |
say $out "Added authorized values"; |
40 |
say $out "Added authorized values PATRON_MISTAKE and PATRON_STILL_NEEDS_ACCOUNT"; |
41 |
} |
41 |
} |
42 |
}, |
42 |
}, |
43 |
}; |
43 |
}; |