Lines 2-8
use Modern::Perl;
Link Here
|
2 |
|
2 |
|
3 |
use C4::Context; |
3 |
use C4::Context; |
4 |
use Koha::Reports; |
4 |
use Koha::Reports; |
5 |
use Term::ANSIColor qw(:constants); |
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 GREEN, "Bug 35570: Updated ILL batches from 'FreeForm' to 'Standard"; |
22 |
say $out colored( "Bug 35570: Updated ILL batches from 'FreeForm' to 'Standard'", 'green' ); |
23 |
} |
23 |
} |
24 |
|
24 |
|
25 |
my ($illrequestattributes) = $dbh->selectrow_array( |
25 |
my ($illrequestattributes) = $dbh->selectrow_array( |
Lines 30-36
return {
Link Here
|
30 |
|
30 |
|
31 |
if ($illrequestattributes) { |
31 |
if ($illrequestattributes) { |
32 |
$dbh->do("UPDATE illrequestattributes SET backend = 'Standard' where backend = 'FreeForm'"); |
32 |
$dbh->do("UPDATE illrequestattributes SET backend = 'Standard' where backend = 'FreeForm'"); |
33 |
say $out GREEN, "Bug 35570: Updated ILL request attributes from 'FreeForm' to 'Standard"; |
33 |
say $out colored( "Bug 35570: Updated ILL request attributes from 'FreeForm' to 'Standard'", 'green' ); |
34 |
} |
34 |
} |
35 |
|
35 |
|
36 |
my ($illrequests) = $dbh->selectrow_array( |
36 |
my ($illrequests) = $dbh->selectrow_array( |
Lines 41-47
return {
Link Here
|
41 |
|
41 |
|
42 |
if ($illrequests) { |
42 |
if ($illrequests) { |
43 |
$dbh->do("UPDATE illrequests SET backend = 'Standard' where backend = 'FreeForm'"); |
43 |
$dbh->do("UPDATE illrequests SET backend = 'Standard' where backend = 'FreeForm'"); |
44 |
say $out GREEN, "Bug 35570: Updated ILL requests from 'FreeForm' to 'Standard"; |
44 |
say $out colored( "Bug 35570: Updated ILL requests from 'FreeForm' to 'Standard'", 'green' ); |
45 |
} |
45 |
} |
46 |
|
46 |
|
47 |
my $reports = join( |
47 |
my $reports = join( |
Lines 57-66
return {
Link Here
|
57 |
); |
57 |
); |
58 |
|
58 |
|
59 |
if ($reports) { |
59 |
if ($reports) { |
60 |
say $out YELLOW, |
60 |
say $out colored( |
61 |
"Bug 35570: **ACTION REQUIRED**: Saved SQL reports containing occurrences of 'FreeForm' were found.\nThe following reports MUST be updated accordingly ('FreeForm' -> 'Standard'):"; |
61 |
"Bug 35570: **ACTION REQUIRED**: Saved SQL reports containing occurrences of 'FreeForm' were found. The following reports MUST be updated accordingly ('FreeForm' -> 'Standard'):", |
62 |
say $out BRIGHT_YELLOW, |
62 |
'yellow' |
63 |
$reports; |
63 |
); |
|
|
64 |
say $out colored( $reports, 'blue'); |
64 |
} else { |
65 |
} else { |
65 |
say $out "Bug 35570: Finished database update."; |
66 |
say $out "Bug 35570: Finished database update."; |
66 |
} |
67 |
} |
67 |
- |
|
|