Bugzilla – Attachment 93905 Details for
Bug 23781
Recalls notices and messaging preferences
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23781: SMS notices and messaging preferences for recalls
Bug-23781-SMS-notices-and-messaging-preferences-fo.patch (text/plain), 61.80 KB, created by
Aleisha Amohia
on 2019-10-08 22:30:22 UTC
(
hide
)
Description:
Bug 23781: SMS notices and messaging preferences for recalls
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2019-10-08 22:30:22 UTC
Size:
61.80 KB
patch
obsolete
>From f9add930a8ed2636e24b0d91e5138cbcc4467a4d Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 25 Sep 2019 01:45:30 +0000 >Subject: [PATCH] Bug 23781: SMS notices and messaging preferences for recalls > >This patch adds recalls notices (pick up a waiting recall or return a >requested recall) to the messaging preferences. > >To test: >1) Apply Bug 19532 >2) Apply this bug >3) Update database, rebuild dbix files >4) Ensure UseRecalls syspref is enabled and values have been set in the >circulation rules for recalls >5) Go to a borrower (Person A) account page in the Intranet or the OPAC >6) Go to messaging preferences >7) Notice there are now preferences for two recalls notices >8) Select email as a preference >9) Find a different borrower (Person B) and set their messaging >preferences to SMS >10) Check out any item to Person B >11) Go to the OPAC logged in as Person A and find that item >12) Recall the item >13) In the terminal, look at the message_queue in the database. There >should be a 'RETURN_RECALLED_ITEM' recall notice sent to Person B via SMS >14) Go back to the Intranet and check in the item. Confirm the recall >when checking in >15) Look at the message_queue in the database again. There should be a >'PICKUP_RECALLED_ITEM' recall notice sent to Person A via email. > >Sponsored-by: Toi Ohomai Institute of Technology >--- > circ/returns.pl | 37 ++++++ > .../bug23781-recalls-message-attributes.perl | 7 ++ > .../bug23781-recalls-message-transports.perl | 7 ++ > .../atomicupdate/bug23781-recalls-sms-notices.perl | 7 ++ > .../data/mysql/de-DE/mandatory/sample_notices.sql | 7 +- > .../data/mysql/en/mandatory/sample_notices.sql | 7 +- > .../sample_notices_message_attributes.sql | 10 ++ > .../sample_notices_message_transports.sql | 24 ++++ > .../data/mysql/es-ES/mandatory/sample_notices.sql | 7 +- > .../mysql/fr-CA/obligatoire/sample_notices.sql | 17 +++ > .../mysql/fr-FR/1-Obligatoire/sample_notices.sql | 7 +- > installer/data/mysql/it-IT/necessari/notices.sql | 7 +- > .../mysql/nb-NO/1-Obligatorisk/sample_notices.sql | 7 +- > .../data/mysql/pl-PL/mandatory/sample_notices.sql | 7 +- > .../data/mysql/ru-RU/mandatory/sample_notices.sql | 7 +- > .../data/mysql/uk-UA/mandatory/sample_notices.sql | 7 +- > .../prog/en/includes/messaging-preference-form.inc | 2 + > .../bootstrap/en/modules/opac-messaging.tt | 2 + > opac/opac-recall.pl | 136 +++++++++++++++++++++ > 19 files changed, 303 insertions(+), 9 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug23781-recalls-message-attributes.perl > create mode 100644 installer/data/mysql/atomicupdate/bug23781-recalls-message-transports.perl > create mode 100644 installer/data/mysql/atomicupdate/bug23781-recalls-sms-notices.perl > create mode 100644 installer/data/mysql/en/mandatory/sample_notices_message_attributes.sql > create mode 100644 installer/data/mysql/en/mandatory/sample_notices_message_transports.sql > create mode 100755 opac/opac-recall.pl > >diff --git a/circ/returns.pl b/circ/returns.pl >index 42226b4..39703b8 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -186,6 +186,43 @@ if ( $query->param('reserve_id') ) { > } > } > >+if ( $query->param('recall_id') ){ >+ my $recall = Koha::Recalls->find(scalar $query->param('recall_id')); >+ my $recall_borrower = $recall->patron; >+ my $item = Koha::Items->find($recall->itemnumber); >+ my $biblio = Koha::Biblios->find($item->biblionumber); >+ >+ my $issuing_rule = Koha::IssuingRules->get_effective_issuing_rule({ categorycode => $recall_borrower->categorycode, itemtype => $item->itype, branchcode => $item->holdingbranch }); >+ my $shelf_time = $issuing_rule->recall_shelf_time || C4::Context->preference('RecallsMaxPickUpDelay'); >+ my $expirationdate = dt_from_string()->add( $issuing_rule->lengthunit => $shelf_time ); >+ >+ $recall->update({ status => 'W', waitingdate => dt_from_string(), expirationdate => $expirationdate }); >+ # send notice to user who requested recall to pick up item >+ >+ my $letter = C4::Letters::GetPreparedLetter ( >+ module => 'circulation', >+ letter_code => 'PICKUP_RECALLED_ITEM', >+ branchcode => $recall->branchcode, >+ tables => { >+ 'biblio', $biblio->biblionumber, >+ 'borrowers', $recall_borrower->borrowernumber, >+ 'items', $item->itemnumber, >+ 'recalls', $recall->recall_id, >+ }, >+ ); >+ >+ my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $recall_borrower->borrowernumber, message_name => 'Recall_Waiting' }); >+ >+ while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) { >+ if ( $transport eq 'email' ){ >+ C4::Message->enqueue($letter, $recall_borrower->unblessed, 'email'); >+ } >+ if ( $transport eq 'sms' ){ >+ C4::Message->enqueue($letter, $recall_borrower->unblessed, 'sms'); >+ } >+ } >+} >+ > my $borrower; > my $returned = 0; > my $messages; >diff --git a/installer/data/mysql/atomicupdate/bug23781-recalls-message-attributes.perl b/installer/data/mysql/atomicupdate/bug23781-recalls-message-attributes.perl >new file mode 100644 >index 0000000..b80e61d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug23781-recalls-message-attributes.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{INSERT IGNORE INTO message_attributes (message_attribute_id, message_name, takes_days) VALUES (7, 'Recall_Waiting', 0), (8, 'Recall_Requested', 0) }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23781 - Adding message attributes for recalls)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/bug23781-recalls-message-transports.perl b/installer/data/mysql/atomicupdate/bug23781-recalls-message-transports.perl >new file mode 100644 >index 0000000..ef4d082 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug23781-recalls-message-transports.perl >@@ -0,0 +1,7 @@ >+$DBversion = 'XXX'; >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q{INSERT IGNORE INTO message_transports (message_attribute_id, message_transport_type, is_digest, letter_module, letter_code, branchcode) VALUES (7, "email", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (7, "sms", 0, "circulation", "PICKUP_RECALLED_ITEM", null), (8, "email", 0, "circulation", "RETURN_RECALLED_ITEM", null), (8, "sms", 0, "circulation", "RETURN_RECALLED_ITEM", null) }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23781 - Adding message transports for recalls)\n"; >+} >diff --git a/installer/data/mysql/atomicupdate/bug23781-recalls-sms-notices.perl b/installer/data/mysql/atomicupdate/bug23781-recalls-sms-notices.perl >new file mode 100644 >index 0000000..5349eff >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug23781-recalls-sms-notices.perl >@@ -0,0 +1,7 @@ >+$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',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), ('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms') }); >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23781 - Adding sms notices for recalls)\n"; >+} >diff --git a/installer/data/mysql/de-DE/mandatory/sample_notices.sql b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >index d710bd6..540a643 100644 >--- a/installer/data/mysql/de-DE/mandatory/sample_notices.sql >+++ b/installer/data/mysql/de-DE/mandatory/sample_notices.sql >@@ -317,4 +317,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Report über Bestandsrotation', 0, 'Report über Bestandsrotation', 'Report über Bestandsrotation für [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] Exemplare wurden für diese Bibliothek bearbeitet.\r\n[% ELSE %]Es wurden keine Exemplare für diese Bibliothek bearbeitet\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Titel: [% item.title %]\r\nVerfasser: [% item.author %]\r\nSignatur: [% item.callnumber %]\r\nStandort: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nAusgeliehen?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nAktuelle Bibliothek: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Report über Bestandsrotation', 0, 'Report über Bestandsrotation', 'Report über Bestandsrotation für [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] Exemplare wurden für diese Bibliothek bearbeitet.\r\n[% ELSE %]Es wurden keine Exemplare für diese Bibliothek bearbeitet\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Titel: [% item.title %]\r\nVerfasser: [% item.author %]\r\nSignatur: [% item.callnumber %]\r\nStandort: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nAusgeliehen?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nAktuelle Bibliothek: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!','email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!','sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup','<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!','sms'); >diff --git a/installer/data/mysql/en/mandatory/sample_notices.sql b/installer/data/mysql/en/mandatory/sample_notices.sql >index 6d676e7..9780183 100644 >--- a/installer/data/mysql/en/mandatory/sample_notices.sql >+++ b/installer/data/mysql/en/mandatory/sample_notices.sql >@@ -315,4 +315,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/en/mandatory/sample_notices_message_attributes.sql b/installer/data/mysql/en/mandatory/sample_notices_message_attributes.sql >new file mode 100644 >index 0000000..c3a2f65 >--- /dev/null >+++ b/installer/data/mysql/en/mandatory/sample_notices_message_attributes.sql >@@ -0,0 +1,10 @@ >+insert into `message_attributes` >+(`message_attribute_id`, message_name, `takes_days`) >+values >+(1, 'Item_Due', 0), >+(2, 'Advance_Notice', 1), >+(4, 'Hold_Filled', 0), >+(5, 'Item_Check_in', 0), >+(6, 'Item_Checkout', 0), >+(7, 'Recall_Waiting', 0), >+(8, 'Recall_Requested', 0); >diff --git a/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql b/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql >new file mode 100644 >index 0000000..7806fdc >--- /dev/null >+++ b/installer/data/mysql/en/mandatory/sample_notices_message_transports.sql >@@ -0,0 +1,24 @@ >+insert into `message_transports` >+(`message_attribute_id`, `message_transport_type`, `is_digest`, `letter_module`, `letter_code`) >+values >+(1, 'email', 0, 'circulation', 'DUE'), >+(1, 'email', 1, 'circulation', 'DUEDGST'), >+(1, 'sms', 0, 'circulation', 'DUE'), >+(1, 'sms', 1, 'circulation', 'DUEDGST'), >+(2, 'email', 0, 'circulation', 'PREDUE'), >+(2, 'email', 1, 'circulation', 'PREDUEDGST'), >+(2, 'sms', 0, 'circulation', 'PREDUE'), >+(2, 'sms', 1, 'circulation', 'PREDUEDGST'), >+(2, 'phone', 0, 'circulation', 'PREDUE'), >+(2, 'phone', 1, 'circulation', 'PREDUEDGST'), >+(4, 'email', 0, 'reserves', 'HOLD'), >+(4, 'sms', 0, 'reserves', 'HOLD'), >+(4, 'phone', 0, 'reserves', 'HOLD'), >+(5, 'email', 0, 'circulation', 'CHECKIN'), >+(5, 'sms', 0, 'circulation', 'CHECKIN'), >+(6, 'email', 0, 'circulation', 'CHECKOUT'), >+(6, 'sms', 0, 'circulation', 'CHECKOUT'), >+(7, "email", 0, "circulation", "PICKUP_RECALLED_ITEM"), >+(7, "sms", 0, "circulation", "PICKUP_RECALLED_ITEM"), >+(8, "email", 0, "circulation", "RETURN_RECALLED_ITEM"), >+(8, "sms", 0, "circulation", "RETURN_RECALLED_ITEM"); >diff --git a/installer/data/mysql/es-ES/mandatory/sample_notices.sql b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >index 965850a..988fa06 100644 >--- a/installer/data/mysql/es-ES/mandatory/sample_notices.sql >+++ b/installer/data/mysql/es-ES/mandatory/sample_notices.sql >@@ -310,4 +310,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >index b1c8b64..e4fe8ba 100644 >--- a/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-CA/obligatoire/sample_notices.sql >@@ -75,6 +75,23 @@ INSERT INTO letter ( module, code, branchcode, name, is_html, title, content, me > ', 'print' ); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >+('circulation', 'AR_CANCELED', '', 'Article request - canceled', 0, 'Article request canceled', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nYour request for an article from <<biblio.title>> (<<items.barcode>>) has been canceled for the following reason:\r\n\r\n<<article_requests.notes>>\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nYour library', 'email'), >+('circulation', 'AR_COMPLETED', '', 'Article request - completed', 0, 'Article request completed', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nWe have completed your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nYou may pick your article up at <<branches.branchname>>.\r\n\r\nThank you!', 'email'), >+('circulation', 'AR_PENDING', '', 'Article request - pending', 0, 'Article request received', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)\r\n\r\nWe have received your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\n\r\nThank you!', 'email'), >+('circulation', 'AR_SLIP', '', 'Article request - print slip', 0, 'Article request', 'Article request:\r\n\r\n<<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nTitle: <<biblio.title>>\r\nBarcode: <<items.barcode>>\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n', 'print'), >+('circulation', 'AR_PROCESSING', '', 'Article request - processing', 0, 'Article request processing', 'Dear <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nWe are now processing your request for an article from <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle requested:\r\nTitle: <<article_requests.title>>\r\nAuthor: <<article_requests.author>>\r\nVolume: <<article_requests.volume>>\r\nIssue: <<article_requests.issue>>\r\nDate: <<article_requests.date>>\r\nPages: <<article_requests.pages>>\r\nChapters: <<article_requests.chapters>>\r\nNotes: <<article_requests.patron_notes>>\r\n\r\nThank you!', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >+ >+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','<html>\r\n<p>Ce courriel vous a été envoyé suite à une demande de récupération de mot de passe pour le compte de <strong><<user>></strong>.\r\n</p>\r\n<p>\r\nVous pouvez créer un nouveau mot de passe en cliquant le lien suivant :\r\n<br/><a href=\"<<passwordreseturl>>\"><<passwordreseturl>></a>\r\n</p>\r\n<p>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..</p>\r\n<p>Merci.</p>\r\n</html>\r\n','email'), >+('members','MEMBERSHIP_EXPIRY','','Expiration du compte',0,'Expitation prochaine de votre abonnement à la bibliothèque','Bonjour <<borrowers.title>> <<borrowers.firstname>> <<borrowers.surname>>,.\r\n\r\nVotre carte de bibliothèque expirera prochainement, le :\r\n\r\n<<borrowers.dateexpiry>>\r\n\r\nMerci,\r\n\r\nVotre bibliothèque\r\n\r\n<<branches.branchname>>','email'); >+ >+INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >+>>>>>>> 38d1138... WR313212: Recalls messaging preferences and SMS notices > ('circulation', 'AR_CANCELED', '', 'Demande d\'article - annulation', 0, 'Demande d\'article annulée', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nVotre demande d\'article de <<biblio.title>> (<<items.barcode>>) a été annulée pour la raison suivante :\r\n\r\n<<article_requests.notes>>\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\nVotre bibliothèque.', 'email'), > ('circulation', 'AR_COMPLETED', '', 'Demande d\'article - disponible', 0, 'L\'article demandé est disponible', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>),\r\n\r\nL\'article de <<biblio.title>> (<<items.barcode>>) que vous avez demandé est maintenant disponible.\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\nVous pouvez venir chercher votre article à <<branches.branchname>>.\r\n\r\nMerci.', 'email'), > ('circulation', 'AR_PENDING', '', 'Demande d\'article - en attente', 0, 'Demande d\'article reçue', 'Bonjour <<borrowers.firstname>> <<borrowers.surname>> (<<borrowers.cardnumber>>)\r\n\r\nNous avons bien reçu votre demande d\'article de <<biblio.title>> (<<items.barcode>>).\r\n\r\nArticle demandé :\r\nTitre : <<article_requests.title>>\r\nAuteur : <<article_requests.author>>\r\nVolume : <<article_requests.volume>>\r\nNuméro : <<article_requests.issue>>\r\nDate : <<article_requests.date>>\r\nPages : <<article_requests.pages>>\r\nChapitres : <<article_requests.chapters>>\r\nNotes : <<article_requests.patron_notes>>\r\n\r\n\r\nMerci.', 'email'), >diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >index b3dfec2..5e96540 100644 >--- a/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >+++ b/installer/data/mysql/fr-FR/1-Obligatoire/sample_notices.sql >@@ -311,4 +311,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/it-IT/necessari/notices.sql b/installer/data/mysql/it-IT/necessari/notices.sql >index adde2c4..4fff8bf 100644 >--- a/installer/data/mysql/it-IT/necessari/notices.sql >+++ b/installer/data/mysql/it-IT/necessari/notices.sql >@@ -313,4 +313,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent Library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent Library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >index 794c797..b25028d 100644 >--- a/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >+++ b/installer/data/mysql/nb-NO/1-Obligatorisk/sample_notices.sql >@@ -330,4 +330,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >index 115a6ad..8762a05 100644 >--- a/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >+++ b/installer/data/mysql/pl-PL/mandatory/sample_notices.sql >@@ -308,4 +308,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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 t he item before the due date.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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 <<recal ls.expirationdate>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >index a979698..2a322c0 100644 >--- a/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >+++ b/installer/data/mysql/ru-RU/mandatory/sample_notices.sql >@@ -310,4 +310,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock Rotation Slip', 0, 'Stockrotation Report', 'Stockrotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >index 63319ad..29c491a 100644 >--- a/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >+++ b/installer/data/mysql/uk-UA/mandatory/sample_notices.sql >@@ -399,4 +399,9 @@ INSERT IGNORE INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, > </table>', 'print', 'default'); > > INSERT INTO `letter` (`module`, `code`, `branchcode`, `name`, `is_html`, `title`, `content`, `message_transport_type`) VALUES >-('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'); >+('circulation', 'SR_SLIP', '', 'Stock rotation slip', 0, 'Stock rotation report', 'Stock rotation report for [% branch.name %]:\r\n\r\n[% IF branch.items.size %][% branch.items.size %] items to be processed for this branch.\r\n[% ELSE %]No items to be processed for this branch\r\n[% END %][% FOREACH item IN branch.items %][% IF item.reason != \'in-demand\' %]Title: [% item.title %]\r\nAuthor: [% item.author %]\r\nCallnumber: [% item.callnumber %]\r\nLocation: [% item.location %]\r\nBarcode: [% item.barcode %]\r\nOn loan?: [% item.onloan %]\r\nStatus: [% item.reason %]\r\nCurrent library: [% item.branch.branchname %] [% item.branch.branchcode %]\r\n\r\n[% END %][% END %]', 'email'), >+('circulation', 'CHECKOUT_NOTE', '', 'Checkout note on item set by patron', '0', 'Checkout note', '<<borrowers.firstname>> <<borrowers.surname>> has added a note to the item <<biblio.title>> - <<biblio.author>> (<<biblio.biblionumber>>).','email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'email'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'email'), >+('circulation','RETURN_RECALLED_ITEM','','Notification to return a recalled item','0','Notification to return a recalled item',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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.\n\nThank you!",'sms'), >+('circulation','PICKUP_RECALLED_ITEM','','Recalled item awaiting pickup','0','Recalled item awaiting pickup',"<h5>Date: <<today>></h5>\n\n<h3><<borrowers.firstname>> <<borrowers.surname>>,</h3>\n\nA 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>>.\n\nThank you!",'sms'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >index 2f948c6..d18f95c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/messaging-preference-form.inc >@@ -20,6 +20,8 @@ > [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled > [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in > [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout >+ [% ELSIF ( messaging_preference.Recall_Waiting ) %]Recall awaiting pickup >+ [% ELSIF ( messaging_preference.Recall_Requested ) %]Return recalled item > [% ELSE %]Unknown [% END %]</td> > [% IF ( messaging_preference.takes_days ) %] > <td> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index d33c7b7..24170f7 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -51,6 +51,8 @@ > [% ELSIF ( messaging_preference.Hold_Filled ) %]Hold filled > [% ELSIF ( messaging_preference.Item_Check_in ) %]Item check-in > [% ELSIF ( messaging_preference.Item_Checkout ) %]Item checkout >+ [% ELSIF ( messaging_preference.Recall_Requested ) %]Return recalled item >+ [% ELSIF ( messaging_preference.Recall_Waiting ) %]Recall awaiting pickup > [% ELSE %]Unknown [% END %]</td> > [% IF ( messaging_preference.takes_days ) %] > <td><select class="input-mini" name="[% messaging_preference.message_attribute_id | html %]-DAYS"> >diff --git a/opac/opac-recall.pl b/opac/opac-recall.pl >new file mode 100755 >index 0000000..ceb134c >--- /dev/null >+++ b/opac/opac-recall.pl >@@ -0,0 +1,136 @@ >+#!/usr/bin/perl >+ >+# This file is part of Koha. >+# >+# Copyright 2017 Aleisha Amohia <aleisha@catalyst.net.nz> >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use CGI qw ( -utf8 ); >+use DateTime; >+use C4::Auth; >+use C4::Output; >+use C4::Context; >+use C4::Letters; >+use Koha::Items; >+use Koha::Recall; >+use Koha::Recalls; >+use Koha::DateUtils; >+use Koha::IssuingRules; >+use Koha::Patrons; >+ >+my $query = new CGI; >+my ( $template, $borrowernumber, $cookie ) = get_template_and_user( >+ { >+ template_name => "opac-recall.tt", >+ query => $query, >+ type => "opac", >+ authnotrequired => 0, >+ } >+); >+ >+my $op = $query->param('op') || ''; >+ >+my $itemnumber = $query->param('itemnumber'); >+my $item = Koha::Items->find($itemnumber); >+my $biblio = Koha::Biblios->find($item->biblionumber); >+my $patron = Koha::Patrons->find($borrowernumber); >+my $recalled = Koha::Recalls->find({ itemnumber => $itemnumber }); >+my $error; >+ >+if ( defined $recalled && $recalled->borrowernumber == $borrowernumber && ($recalled->is_requested || $recalled->is_waiting || $recalled->is_overdue) ){ >+ # can't place a recall on an item that this borrower has already recalled >+ # if recall is expired or cancelled, user may recall again >+ $error = 'duplicate'; >+} >+ >+if ($op eq 'request'){ >+ if (!defined $borrowernumber){ >+ # can't place recall if not logged in >+ $error = 'notloggedin'; >+ print $query->redirect('/cgi-bin/koha/opac-detail.pl?biblionumber='.$item->biblionumber); >+ } elsif ( !defined $error ){ >+ # can recall >+ my $borrower = Koha::Patrons->find($borrowernumber); >+ my $issuing_rule = Koha::IssuingRules->get_effective_issuing_rule({ categorycode => $borrower->categorycode, itemtype => $item->itype, branchcode => $item->holdingbranch }); >+ my $recall_request = Koha::Recall->new({ >+ borrowernumber => $borrowernumber, >+ recalldate => dt_from_string(), >+ biblionumber => $biblio->biblionumber, >+ branchcode => $item->holdingbranch, >+ status => 'R', >+ itemnumber => $itemnumber, >+ itemtype => $item->itype, >+ })->store; >+ if (defined $recall_request->recall_id){ # successful recall >+ my $recall = Koha::Recalls->find($recall_request->recall_id); >+ # updating due date on checkout >+ my $timestamp = dt_from_string($recall->timestamp); >+ my $due_date; >+ if ( $issuing_rule->recall_due_date_interval eq '' ) { >+ $due_date = $timestamp->add( $issuing_rule->lengthunit => 0 ); >+ } else { >+ $due_date = $timestamp->add( $issuing_rule->lengthunit => $issuing_rule->recall_due_date_interval ); >+ } >+ my $checkout = Koha::Checkouts->find({ itemnumber => $itemnumber })->update({ date_due => $due_date }); >+ my $checkout_borrower = Koha::Patrons->find($checkout->borrowernumber->borrowernumber); >+ >+ # send notice to user with recalled item checked out >+ my $letter = C4::Letters::GetPreparedLetter ( >+ module => 'circulation', >+ letter_code => 'RETURN_RECALLED_ITEM', >+ branchcode => $recall->branchcode, >+ tables => { >+ 'biblio', $biblio->biblionumber, >+ 'borrowers', $checkout_borrower->borrowernumber, >+ 'items', $itemnumber, >+ 'issues', $itemnumber, >+ }, >+ ); >+ >+ my $messaging_preferences = C4::Members::Messaging::GetMessagingPreferences({ borrowernumber => $checkout_borrower->borrowernumber, message_name => 'Recall_Requested' }); >+ >+ while ( my ( $transport, $letter_code ) = each %{ $messaging_preferences->{transports} } ) { >+ if ( $transport eq 'email' ){ >+ C4::Message->enqueue($letter, $checkout_borrower->unblessed, 'email'); >+ } >+ if ( $transport eq 'sms' ){ >+ C4::Message->enqueue($letter, $checkout_borrower->unblessed, 'sms'); >+ } >+ } >+ >+ $template->param( >+ success => 1, >+ due_interval => $issuing_rule->recall_due_date_interval, >+ due_unit => $issuing_rule->lengthunit, >+ due_date => $checkout->date_due >+ ); >+ } else { >+ $error = 'failed'; >+ } >+ } >+} elsif ($op eq 'cancel'){ >+ my $recall_id = $query->param('recall_id'); >+ Koha::Recalls->find($recall_id)->update({ cancellationdate => dt_from_string(), status => 'C', old => 1 }); >+ print $query->redirect('/cgi-bin/koha/opac-user.pl'); >+} >+ >+$template->param( >+ biblio => $biblio, >+ itemnumber => $itemnumber, >+ error => $error >+); >+ >+output_with_http_headers $query, $cookie, $template->output, 'html'; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23781
:
93905
|
104984
|
131702
|
132044
|
140242
|
140244
|
147107
|
148248
|
148260
|
150430
|
150441
|
155346
|
158696
|
158697
|
158698
|
159013
|
159014
|
159015
|
162377
|
162378
|
162379
|
162380
|
165240
|
165241
|
165242
|
165593
|
165614
|
165615
|
165616
|
165617
|
169201
|
169202
|
169203
|
169204
|
169205