Browse Source
- Add recalls table - Add recalls circulation rules - recalls allowed, recalls per record, on shelf recalls, recall due date interval, recall overdue fine, recall shelf time - Add system preferences - useRecalls, RecallsMaxPickUpDelay, RecallsLog - Add email notices (RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM) - Add print notice (RECALL_REQUESTER_DET) - Add user permission - recalls, manage_recalls - Add Recall and CancelRecall enum options for branchtransfers reason Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>22.05.x
Aleisha Amohia
4 years ago
committed by
Fridolin Somers
21 changed files with 346 additions and 7 deletions
@ -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" ); |
|||
} |
@ -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" ); |
|||
} |
@ -0,0 +1,36 @@ |
|||
$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: <<today>> |
|||
|
|||
<<borrowers.firstname>> <<borrowers.surname>>, |
|||
|
|||
A recall has been placed on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>). The due date has been updated, and is now <<issues.date_due>>. Please return the item before the due date. |
|||
|
|||
Thank you!','email'), |
|||
('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','Date: <<today>> |
|||
|
|||
<<borrowers.firstname>> <<borrowers.surname>>, |
|||
|
|||
A recall that you requested on the following item: <<biblio.title>> / <<biblio.author>> (<<items.barcode>>) is now ready for you to pick up at <<recalls.branchcode>>. Please pick up your item by <<recalls.expirationdate>>. |
|||
|
|||
Thank you!','email'), |
|||
('circulation','RECALL_REQUESTER_DET','','Details of patron who recalled item',0,'Details of patron who recalled item','Date: <<today>> |
|||
|
|||
Recall for pickup at <<branches.branchname>> |
|||
<<borrowers.surname>>, <<borrowers.firstname>> (<<borrowers.cardnumber>>) |
|||
<<borrowers.phone>> |
|||
<<borrowers.streetnumber>> <<borrowers.address>>, <<borrowers.address2>>, <<borrowers.city>> <<borrowers.zipcode>> |
|||
<<borrowers.email>> |
|||
|
|||
ITEM RECALLED |
|||
<<biblio.title>> by <<biblio.author>> |
|||
Barcode: <<items.barcode>> |
|||
Callnumber: <<items.itemcallnumber>> |
|||
Waiting since: <<recalls.waitingdate>> |
|||
Notes: <<recalls.recallnotes>>', 'print') |
|||
}); |
|||
|
|||
NewVersion( $DBversion, 19532, "Add recalls notices: RETURN_RECALLED_ITEM, PICKUP_RECALLED_ITEM, RECALL_REQUESTER_DET" ); |
|||
} |
@ -0,0 +1,11 @@ |
|||
$DBversion = 'XXX'; |
|||
if( CheckVersion( $DBversion ) ) { |
|||
$dbh->do(q{ |
|||
INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES |
|||
('RecallsLog','1',NULL,'If ON, log create/cancel/expire/fulfill actions on recalls','YesNo'), |
|||
('RecallsMaxPickUpDelay','7',NULL,'Define the maximum time a recall can be awaiting pickup','Integer'), |
|||
('UseRecalls','0',NULL,'Enable or disable recalls','YesNo') |
|||
}); |
|||
|
|||
NewVersion( $DBversion, 19532, "Add RecallsLog, RecallsMaxPickUpDelay and UseRecalls system preferences"); |
|||
} |
@ -0,0 +1,34 @@ |
|||
$DBversion = 'XXX'; |
|||
if( CheckVersion( $DBversion ) ) { |
|||
$dbh->do(q{ DROP TABLE IF EXISTS recalls }); |
|||
$dbh->do(q{ |
|||
CREATE TABLE recalls ( |
|||
recall_id int(11) NOT NULL auto_increment, |
|||
borrowernumber int(11) NOT NULL DEFAULT 0, |
|||
recalldate datetime DEFAULT NULL, |
|||
biblionumber int(11) NOT NULL DEFAULT 0, |
|||
branchcode varchar(10) DEFAULT NULL, |
|||
cancellationdate datetime DEFAULT NULL, |
|||
recallnotes mediumtext, |
|||
priority smallint(6) DEFAULT NULL, |
|||
status varchar(1) DEFAULT NULL, |
|||
timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|||
itemnumber int(11) DEFAULT NULL, |
|||
waitingdate datetime DEFAULT NULL, |
|||
expirationdate datetime DEFAULT NULL, |
|||
old TINYINT(1) DEFAULT NULL, |
|||
item_level_recall TINYINT(1) NOT NULL DEFAULT 0, |
|||
PRIMARY KEY (recall_id), |
|||
KEY borrowernumber (borrowernumber), |
|||
KEY biblionumber (biblionumber), |
|||
KEY itemnumber (itemnumber), |
|||
KEY branchcode (branchcode), |
|||
CONSTRAINT recalls_ibfk_1 FOREIGN KEY (borrowernumber) REFERENCES borrowers (borrowernumber) ON DELETE CASCADE ON UPDATE CASCADE, |
|||
CONSTRAINT recalls_ibfk_2 FOREIGN KEY (biblionumber) REFERENCES biblio (biblionumber) ON DELETE CASCADE ON UPDATE CASCADE, |
|||
CONSTRAINT recalls_ibfk_3 FOREIGN KEY (itemnumber) REFERENCES items (itemnumber) ON DELETE CASCADE ON UPDATE CASCADE, |
|||
CONSTRAINT recalls_ibfk_4 FOREIGN KEY (branchcode) REFERENCES branches (branchcode) ON DELETE CASCADE ON UPDATE CASCADE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; |
|||
}); |
|||
|
|||
NewVersion( $DBversion, 19532, "Add recalls table" ); |
|||
} |
Loading…
Reference in new issue