Bug 37901: Add updatedatabase information

This warning will display if there are existing reports that contain 'pseudonymized_borrower_attributes', informing that these reports need to be updated

Signed-off-by: Jeremy Evans <Jeremy.Evans@ukhsa.gov.uk>
Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Pedro Amorim 2025-03-05 12:45:52 +00:00 committed by Lucas Gass
parent 4a9c2a3655
commit de25abcb4d
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 24 additions and 0 deletions

View File

@ -1,5 +1,6 @@
use Modern::Perl;
use Koha::Installer::Output qw(say_warning say_success say_info);
use Koha::Reports;
return {
bug_number => "37901",
@ -45,6 +46,29 @@ return {
);
}
my $reports = join(
"\n",
map( "\tReport ID: "
. $_->id
. ' | Edit link: '
. C4::Context->preference('staffClientBaseURL')
. '/cgi-bin/koha/reports/guided_reports.pl?reports='
. $_->id
. "&phase=Edit%20SQL",
Koha::Reports->search( { savedsql => { -like => "%pseudonymized_borrower_attributes%" } } )->as_list )
);
if ($reports) {
say_warning(
$out,
"Bug 37901: **ACTION REQUIRED**: Saved SQL reports containing occurrences of 'pseudonymized_borrower_attributes' were found. The following reports MUST be updated accordingly ('pseudonymized_borrower_attributes' -> 'pseudonymized_metadata_values', 'code' -> 'key', 'attribute' -> 'value'):"
);
say_info(
$out,
$reports
);
}
say_success( $out, "Finished" );
},
};