|
Lines 1-8
Link Here
|
| 1 |
use Modern::Perl; |
1 |
use Modern::Perl; |
|
|
2 |
use Koha::Installer::Output qw(say_warning say_failure say_success say_info); |
| 2 |
|
3 |
|
| 3 |
use C4::Context; |
4 |
use C4::Context; |
| 4 |
use Koha::Reports; |
5 |
use Koha::Reports; |
| 5 |
use Term::ANSIColor; |
|
|
| 6 |
|
6 |
|
| 7 |
return { |
7 |
return { |
| 8 |
bug_number => "35570", |
8 |
bug_number => "35570", |
|
Lines 19-25
return {
Link Here
|
| 19 |
|
19 |
|
| 20 |
if ($illbatches) { |
20 |
if ($illbatches) { |
| 21 |
$dbh->do("UPDATE illbatches SET backend = 'Standard' where backend = 'FreeForm'"); |
21 |
$dbh->do("UPDATE illbatches SET backend = 'Standard' where backend = 'FreeForm'"); |
| 22 |
say $out colored( "Bug 35570: Updated ILL batches from 'FreeForm' to 'Standard'", 'green' ); |
22 |
say_success( |
|
|
23 |
$out, |
| 24 |
"Bug 35570: Updated ILL batches from 'FreeForm' to 'Standard'" |
| 25 |
); |
| 23 |
} |
26 |
} |
| 24 |
|
27 |
|
| 25 |
my ($illrequestattributes) = $dbh->selectrow_array( |
28 |
my ($illrequestattributes) = $dbh->selectrow_array( |
|
Lines 30-36
return {
Link Here
|
| 30 |
|
33 |
|
| 31 |
if ($illrequestattributes) { |
34 |
if ($illrequestattributes) { |
| 32 |
$dbh->do("UPDATE illrequestattributes SET backend = 'Standard' where backend = 'FreeForm'"); |
35 |
$dbh->do("UPDATE illrequestattributes SET backend = 'Standard' where backend = 'FreeForm'"); |
| 33 |
say $out colored( "Bug 35570: Updated ILL request attributes from 'FreeForm' to 'Standard'", 'green' ); |
36 |
say_success( |
|
|
37 |
$out, |
| 38 |
"Bug 35570: Updated ILL request attributes from 'FreeForm' to 'Standard'" |
| 39 |
); |
| 34 |
} |
40 |
} |
| 35 |
|
41 |
|
| 36 |
my ($illrequests) = $dbh->selectrow_array( |
42 |
my ($illrequests) = $dbh->selectrow_array( |
|
Lines 41-47
return {
Link Here
|
| 41 |
|
47 |
|
| 42 |
if ($illrequests) { |
48 |
if ($illrequests) { |
| 43 |
$dbh->do("UPDATE illrequests SET backend = 'Standard' where backend = 'FreeForm'"); |
49 |
$dbh->do("UPDATE illrequests SET backend = 'Standard' where backend = 'FreeForm'"); |
| 44 |
say $out colored( "Bug 35570: Updated ILL requests from 'FreeForm' to 'Standard'", 'green' ); |
50 |
say_success( |
|
|
51 |
$out, |
| 52 |
"Bug 35570: Updated ILL requests from 'FreeForm' to 'Standard'" |
| 53 |
); |
| 45 |
} |
54 |
} |
| 46 |
|
55 |
|
| 47 |
my $reports = join( |
56 |
my $reports = join( |
|
Lines 57-69
return {
Link Here
|
| 57 |
); |
66 |
); |
| 58 |
|
67 |
|
| 59 |
if ($reports) { |
68 |
if ($reports) { |
| 60 |
say $out colored( |
69 |
say_warning( |
| 61 |
"Bug 35570: **ACTION REQUIRED**: Saved SQL reports containing occurrences of 'FreeForm' were found. The following reports MUST be updated accordingly ('FreeForm' -> 'Standard'):", |
70 |
$out, |
| 62 |
'yellow' |
71 |
"Bug 35570: **ACTION REQUIRED**: Saved SQL reports containing occurrences of 'FreeForm' were found. The following reports MUST be updated accordingly ('FreeForm' -> 'Standard'):" |
|
|
72 |
); |
| 73 |
say_info( |
| 74 |
$out, |
| 75 |
$reports |
| 63 |
); |
76 |
); |
| 64 |
say $out colored( $reports, 'blue'); |
|
|
| 65 |
} else { |
77 |
} else { |
| 66 |
say $out "Bug 35570: Finished database update."; |
78 |
say_info( $out, "Bug 35570: Finished database update." ); |
| 67 |
} |
79 |
} |
| 68 |
|
80 |
|
| 69 |
}, |
81 |
}, |
| 70 |
- |
|
|