@@ -, +, @@ package click on the "More" button on the right hand side of the button bar. You should see "Export patron's GDPR data" option. Selecting that will currently just go to the readingrec.pl page. the "More" button in the patron page. --- .../bug_20028-add_allowgdprpatronexport_syspref.perl | 16 ++++++++++++++++ installer/data/mysql/sysprefs.sql | 1 + .../intranet-tmpl/prog/en/includes/members-toolbar.inc | 3 +++ .../prog/en/modules/admin/preferences/patrons.pref | 6 ++++++ koha-tmpl/intranet-tmpl/prog/js/members-menu.js | 8 ++++++++ 5 files changed, 34 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20028-add_allowgdprpatronexport_syspref.perl --- a/installer/data/mysql/atomicupdate/bug_20028-add_allowgdprpatronexport_syspref.perl +++ a/installer/data/mysql/atomicupdate/bug_20028-add_allowgdprpatronexport_syspref.perl @@ -0,0 +1,16 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); + + # or perform some test and warn + # if( !column_exists( 'biblio', 'biblionumber' ) ) { + # warn "There is something wrong"; + # } + + $dbh->do( "INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('AllowGDPRPatronExport', '1', '', 'Allow patron GDPR export from staff interface.', 'yesno')" ); + + # Always end with this (adjust the bug info) + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20028 - Export all patron related personal data in one package)\n"; +} --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -17,6 +17,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('AllFinesNeedOverride','1','0','If on, staff will be asked to override every fine, even if it is below noissuescharge.','YesNo'), ('AllowAllMessageDeletion','0','','Allow any Library to delete any message','YesNo'), ('AllowFineOverride','0','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','YesNo'), +('AllowGDPRPatronExport','1','','If set all data for a patron can be exported from the staff interface.','YesNo'), ('AllowHoldDateInFuture','0','','If set a date field is displayed on the Hold screen of the Staff Interface, allowing the hold date to be set in the future.','YesNo'), ('AllowHoldItemTypeSelection','0','','If enabled, patrons and staff will be able to select the itemtype when placing a hold','YesNo'), ('AllowHoldPolicyOverride','0',NULL,'Allow staff to override hold policies when placing holds','YesNo'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/members-toolbar.inc @@ -91,6 +91,9 @@
  • Export today's checked in barcodes
  • [% END %] [% END %] + [% IF Koha.Preference('AllowGDPRPatronExport') %] +
  • Export patron's GDPR data
  • + [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -1,6 +1,12 @@ Patrons: General: - + - pref: AllowGDPRPatronExport + choices: + yes: "Allow export" + no: "Don't allow export" + - of patron data for GDPR compliance. + - - pref: AutoEmailOpacUser choices: yes: Send --- a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js +++ a/koha-tmpl/intranet-tmpl/prog/js/members-menu.js @@ -73,6 +73,11 @@ $(document).ready(function(){ $(".btn-group").removeClass("open"); return false; }); + $("#exportgdprdata").click(function(){ + export_gdpr_data(); + $(".btn-group").removeClass("open"); + return false; + }); $("#printsummary").click(function(){ printx_window("page"); $(".btn-group").removeClass("open"); @@ -144,6 +149,9 @@ function confirm_reregistration() { function export_barcodes() { window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=' + borrowernumber + '&op=export_barcodes'); } +function export_gdpr_data() { + window.open('/cgi-bin/koha/members/readingrec.pl?borrowernumber=' + borrowernumber + '&op=export_gdprdata'); +} var slip_re = /slip/; function printx_window(print_type) { var handler = print_type.match(slip_re) ? "printslip" : "summary-print"; --