@@ -, +, @@
- recalls table
- circulation rules: recalls allowed (total), recalls per record
- sysprefs: useRecalls, RecallsMaxPickUpDelay, RecallsLog
- email notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM, RECALL_REQUESTER_DET
- user permission: recalls, manage_recalls
- Recall and CancelRecall reasons for branch transfers
---
C4/Auth.pm | 1 +
C4/InstallAuth.pm | 1 +
Koha/CirculationRules.pm | 18 +++++++
Makefile.PL | 1 +
admin/smart-rules.pl | 18 +++++++
...bug_19532-add_recalls_enum_branchtransfers.perl | 6 +++
.../atomicupdate/bug_19532-add_recalls_flags.perl | 7 +++
.../bug_19532-add_recalls_notices.perl | 23 ++++++++
.../bug_19532-add_recalls_sysprefs.perl | 11 ++++
.../atomicupdate/bug_19532-add_recalls_table.perl | 34 ++++++++++++
.../data/mysql/de-DE/mandatory/sample_notices.sql | 17 +++++-
.../data/mysql/en/mandatory/sample_notices.yml | 62 ++++++++++++++++++++++
.../mysql/fr-CA/obligatoire/sample_notices.sql | 17 +++++-
.../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 17 +++++-
installer/data/mysql/it-IT/necessari/notices.sql | 17 +++++-
installer/data/mysql/kohastructure.sql | 34 +++++++++++-
.../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 17 +++++-
.../data/mysql/pl-PL/mandatory/sample_notices.sql | 17 +++++-
.../data/mysql/ru-RU/mandatory/sample_notices.sql | 17 +++++-
installer/data/mysql/sysprefs.sql | 3 ++
.../data/mysql/uk-UA/mandatory/sample_notices.sql | 21 +++++++-
installer/data/mysql/userflags.sql | 3 +-
installer/data/mysql/userpermissions.sql | 3 +-
installer/onboarding.pl | 6 +++
.../intranet-tmpl/prog/en/includes/permissions.inc | 9 ++++
.../en/modules/admin/preferences/circulation.pref | 12 +++++
.../prog/en/modules/admin/preferences/logs.pref | 6 +++
.../prog/en/modules/admin/smart-rules.tt | 51 +++++++++++++++++-
28 files changed, 437 insertions(+), 12 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl
create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl
create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl
create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_sysprefs.perl
create mode 100644 installer/data/mysql/atomicupdate/bug_19532-add_recalls_table.perl
--- a/C4/Auth.pm
+++ a/C4/Auth.pm
@@ -325,6 +325,7 @@ sub get_template_and_user {
$template->param( CAN_user_ill => 1 );
$template->param( CAN_user_stockrotation => 1 );
$template->param( CAN_user_problem_reports => 1 );
+ $template->param( CAN_user_recalls => 1 );
foreach my $module ( keys %$all_perms ) {
foreach my $subperm ( keys %{ $all_perms->{$module} } ) {
--- a/C4/InstallAuth.pm
+++ a/C4/InstallAuth.pm
@@ -148,6 +148,7 @@ sub get_template_and_user {
$template->param( CAN_user_serials => 1 );
$template->param( CAN_user_reports => 1 );
$template->param( CAN_user_problem_reports => 1 );
+ $template->param( CAN_user_recalls => 1 );
}
my $minPasswordLength = C4::Context->preference('minPasswordLength');
--- a/Koha/CirculationRules.pm
+++ a/Koha/CirculationRules.pm
@@ -157,6 +157,24 @@ our $RULE_KINDS = {
note => { # This is not really a rule. Maybe we will want to separate this later.
scope => [ 'branchcode', 'categorycode', 'itemtype' ],
},
+ recalls_allowed => {
+ scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+ },
+ recalls_per_record => {
+ scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+ },
+ on_shelf_recalls => {
+ scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+ },
+ recall_due_date_interval => {
+ scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+ },
+ recall_overdue_fine => {
+ scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+ },
+ recall_shelf_time => {
+ scope => [ 'branchcode', 'categorycode', 'itemtype' ],
+ },
# Not included (deprecated?):
# * accountsent
# * reservecharge
--- a/Makefile.PL
+++ a/Makefile.PL
@@ -354,6 +354,7 @@ my $target_map = {
'./patroncards' => 'INTRANET_CGI_DIR',
'./patron_lists' => 'INTRANET_CGI_DIR',
'./plugins' => 'INTRANET_CGI_DIR',
+ './recalls' => 'INTRANET_CGI_DIR',
'./reports' => 'INTRANET_CGI_DIR',
'./reserve' => 'INTRANET_CGI_DIR',
'./reviews' => 'INTRANET_CGI_DIR',
--- a/admin/smart-rules.pl
+++ a/admin/smart-rules.pl
@@ -112,6 +112,12 @@ if ($op eq 'delete') {
cap_fine_to_replacement_price => undef,
article_requests => undef,
note => undef,
+ recalls_allowed => undef,
+ recalls_per_record => undef,
+ on_shelf_recalls => undef,
+ recall_due_date_interval => undef,
+ recall_overdue_fine => undef,
+ recall_shelf_time => undef,
}
}
);
@@ -288,6 +294,12 @@ elsif ($op eq 'add') {
my $overduefinescap = $input->param('overduefinescap') || '';
my $cap_fine_to_replacement_price = $input->param('cap_fine_to_replacement_price') eq 'on';
my $note = $input->param('note');
+ my $recalls_allowed = $input->param('recalls_allowed');
+ my $recalls_per_record = $input->param('recalls_per_record');
+ my $on_shelf_recalls = $input->param('on_shelf_recalls');
+ my $recall_due_date_interval = $input->param('recall_due_date_interval');
+ my $recall_overdue_fine = $input->param('recall_overdue_fine');
+ my $recall_shelf_time = $input->param('recall_shelf_time');
$debug and warn "Adding $br, $bor, $itemtype, $fine, $maxissueqty, $maxonsiteissueqty, $cap_fine_to_replacement_price";
my $rules = {
@@ -320,6 +332,12 @@ elsif ($op eq 'add') {
cap_fine_to_replacement_price => $cap_fine_to_replacement_price,
article_requests => $article_requests,
note => $note,
+ recalls_allowed => $recalls_allowed,
+ recalls_per_record => $recalls_per_record,
+ on_shelf_recalls => $on_shelf_recalls,
+ recall_due_date_interval => $recall_due_date_interval,
+ recall_overdue_fine => $recall_overdue_fine,
+ recall_shelf_time => $recall_shelf_time,
};
Koha::CirculationRules->set_rules(
--- a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl
+++ a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_enum_branchtransfers.perl
@@ -0,0 +1,6 @@
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{ ALTER TABLE branchtransfers MODIFY COLUMN reason ENUM('Manual', 'StockrotationAdvance', 'StockrotationRepatriation', 'ReturnToHome', 'ReturnToHolding', 'RotatingCollection', 'Reserve', 'LostReserve', 'CancelReserve', 'Recall', 'CancelRecall') });
+
+ NewVersion( $DBversion, 19532, "Add Recall and CancelReserve ENUM options to branchtransfers.reason" );
+}
--- a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl
+++ a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_flags.perl
@@ -0,0 +1,7 @@
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{ INSERT IGNORE INTO userflags (bit, flag, flagdesc, defaulton) VALUES (27, 'recalls', 'Recalls', 0) });
+ $dbh->do(q{ INSERT IGNORE INTO permissions (module_bit, code, description) VALUES (27, 'manage_recalls', 'Manage recalls for patrons') });
+
+ NewVersion( $DBversion, 19532, "Add recalls user flag and manage_recalls user permission" );
+}
--- a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl
+++ a/installer/data/mysql/atomicupdate/bug_19532-add_recalls_notices.perl
@@ -0,0 +1,23 @@
+$DBversion = 'XXX';
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do(q{
+ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES
+ ('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','Date: < Notes:Date: <
Recall for pickup at <
<
<
<ITEM RECALLED
<
<
<
Notes:
<', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Zahlung', 0, 'Zahlungsquittung für Bibliothekskonto', '[%- USE Price -%]\r\nEine Zahlung in Höhe von [% credit.amount * -1 | $Price %] wurde auf Ihr Konto verbucht.\r\n\r\nDiese Zahlung wurde mit den folgenden Gebührenposten verrechnet:\r\n[%- FOREACH o IN offsets %]\r\nBeschreibung: [% o.debit.description %]\r\nGezahlter Betrag: [% o.amount * -1 | $Price %]\r\nOffener Betrag: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), --- a/installer/data/mysql/en/mandatory/sample_notices.yml +++ a/installer/data/mysql/en/mandatory/sample_notices.yml @@ -1179,3 +1179,65 @@ tables: - "Title: <>
Notes:
<" --- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql +++ a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql @@ -84,7 +84,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Demande d\'article - en attente', 0, 'Demande d\'article reçue', 'Bonjour <>
Notes:
<', 'print'); INSERT INTO `letter` (module, code, branchcode, name, is_html, title, content, message_transport_type) VALUES ('members','PASSWORD_RESET','','Récupération de mot de passe en ligne',1,'Récupération de mot de passe','\r\n>
Ce courriel vous a été envoyé suite à une demande de récupération de mot de passe pour le compte de <
\r\nVous pouvez créer un nouveau mot de passe en cliquant le lien suivant :\r\n
>\"><
Ce lien sera valide pour 2 jours après la réception de ce courriel. Si vous ne changez pas votre mot de passe d\'ici deux jours, vous devrez faire une nouvelle demande de récuération de mot de passe..
\r\nMerci.
\r\n\r\n','email'), --- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql +++ a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql @@ -199,7 +199,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <Notes:
<', 'print'); INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`, `lang`) VALUES ('circulation', 'ACCOUNT_PAYMENT', '', 'Account payment', 0, 'Account payment', '[%- USE Price -%]\r\nA payment of [% credit.amount * -1 | $Price %] has been applied to your account.\r\n\r\nThis payment affected the following fees:\r\n[%- FOREACH o IN offsets %]\r\nDescription: [% o.debit.description %]\r\nAmount paid: [% o.amount * -1 | $Price %]\r\nAmount remaining: [% o.debit.amountoutstanding | $Price %]\r\n[% END %]', 'email', 'default'), --- a/installer/data/mysql/it-IT/necessari/notices.sql +++ a/installer/data/mysql/it-IT/necessari/notices.sql @@ -201,7 +201,22 @@ INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title` ('circulation', 'AR_PENDING', '', 'Richiesta articolo - ricevuta', 0, 'Ricevuto la richiesta di un articolo', 'Salve <>