Koha/C4
Jonathan Druart c6e0d42521 Bug 17962: TT syntax for notices - Prove that ACQ_NOTIF_ON_RECEIV is compatible
To make ACQ_NOTIF_ON_RECEIV TT compatible, we need to expose data from
the aqorders table. We already have a package for it in the Koha
namespace but it is based on Koha::Object[s].
The other path creates dummy Koha::Tmp::Order[s] packages to make it
usable. Of course we should use a valid Koha::Acquisition::Order[s]
based on Koha::Object, but it's outside the scope of this bug report.

This notice template is quite simple, and it's a good one to start.
From C4::Acq::NotifyOrderUsers, GetPreparedLetter is called with 4
elements: the library, the patron to notify, the biblio and the order
information.
Note that prior to this patch aqorders was filled from GetOrder, which
retrieved a lot of information from the acquisition table (aqbasket,
aqbookseller). The idea with the TT syntax is to access the data from
where it really exists. So if a user wants to display the basket name,
[% order.basket.basketname %] should be used instead.
Note that this will not work at the moment, the basket method is not
defined in the order package.

However the basic template should work as before.
The test added to TemplateToolkit proves that.

Test plan:
Use the default ACQ_NOTIF_ON_RECEIV to notify a patron that an order has
been received.
That generated template should be exactly the same as prior to this
patch.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-02-17 11:43:46 +00:00
..
AuthoritiesMarc Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Barcodes Bug 14752 - (QA followup) Remove annoying modal, use dialog box instead 2016-09-13 17:21:05 +00:00
ClassSortRoutine Bug 16011: $VERSION - Remove use vars qw(); 2016-03-24 17:20:39 +00:00
Creators Bug 18044: Label Batches not displaying 2017-02-07 17:46:00 +00:00
External Bug 17189: Replace occurrences of 'use Koha::Cache' 2016-09-08 10:24:47 +00:00
Form Bug 16259: Replace CGI->param with CGI->multi_param in list context - part 2 2016-05-16 17:28:06 +00:00
Heading Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
ILSDI Bug 17836: (ILSDI) Make GetPatronInfo fill 'charges' correctly 2017-01-20 13:44:56 +00:00
Installer Bug 17986: Perl dependency evaluation incorrect 2017-01-30 11:18:27 +00:00
Labels Bug 15758: Koha::Libraries - Remove GetBranchName 2016-09-08 14:36:01 +00:00
Linker Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Members Bug 10227 : Fix GetMessagingPreferences when digest is possible 2016-09-13 17:14:28 +00:00
OAI Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Output Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Patroncards Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Reports Bug 17535: Fix search for reports by keywords 2016-11-07 16:38:25 +00:00
Search Bug 17323: Column search_history.time cannot be null 2016-11-18 13:51:37 +00:00
Serials Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
SIP Bug 17196: Move marcxml out of the biblioitems table 2017-01-13 13:49:26 +00:00
Utils Bug 17588: ->get_issues has been replaced with ->checkouts 2017-01-20 14:25:35 +00:00
Accounts.pm Bug 17894 - Remove and replace WriteOffFee 2017-01-19 11:15:26 +00:00
Acquisition.pm Bug 13726: Make Koha::Acq::Bookseller using Koha::Object 2016-12-30 11:54:32 +00:00
Auth.pm Bug 9569: Security patch for AutoLocation 2017-01-30 11:25:06 +00:00
Auth_cas_servers.yaml.sample Bug 17065 - Rename C4/Auth_cas_servers.yaml.orig 2016-08-08 13:16:36 +00:00
Auth_with_cas.pm Bug 17481: Fix incorrect merge of bug 11048 (logout redirection for CAS authentication) 2016-11-07 16:34:57 +00:00
Auth_with_ldap.pm Bug 17775 - Add new user with LDAP not works under Plack 2017-02-07 17:45:13 +00:00
Auth_with_shibboleth.pm Bug 16818: External auth redirect broken under Plack 2016-08-04 19:42:44 +00:00
AuthoritiesMarc.pm Bug 18014: AddAuthority should respect AUTO_INCREMENT 2017-02-14 14:01:11 +00:00
BackgroundJob.pm Bug 16011: $VERSION - Remove empty BEGIN block 2016-03-24 17:20:41 +00:00
Barcodes.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Biblio.pm Bug 17196: [QA Follow-up] Adjust some text on marcxml 2017-01-13 13:49:30 +00:00
Bookseller.pm Bug 13726: Make Koha::Acq::Bookseller using Koha::Object 2016-12-30 11:54:32 +00:00
Boolean.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Breeding.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Budgets.pm Bug 16123 - Display budget hierarchy in the budget dropdown menu used when placing a new order 2016-10-28 15:26:00 +00:00
Calendar.pm Bug 17189: Replace occurrences of 'use Koha::Cache' 2016-09-08 10:24:47 +00:00
Charset.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Circulation.pm Bug 16387: Fix default shortened loan period time 2017-02-07 17:54:21 +00:00
ClassSortRoutine.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ClassSource.pm Bug 17208: Checking if classification source or filing rule already exists before adding 2016-12-23 11:33:48 +00:00
Context.pm Bug 17486: [QA Follow-up] Changes as to set_userenv 2017-01-13 12:32:20 +00:00
Contract.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
CourseReserves.pm Bug 16011: $VERSION - remove use vars $VERSION 2016-03-24 17:20:26 +00:00
Creators.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Debug.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Heading.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
HoldsQueue.pm Bug 14514 - LocalHoldsPriority and the HoldsQueue conflict with each other 2016-10-11 15:44:47 +00:00
HTML5Media.pm Bug 17501: Remove Koha::Upload::get from Koha::Upload 2017-01-20 14:20:05 +00:00
Images.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
ImportBatch.pm Bug 6852: Staged import reports wrong success for items 2016-09-12 08:55:41 +00:00
ImportExportFramework.pm Bug 17389: Clear logs 2016-10-11 16:18:10 +00:00
InstallAuth.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Installer.pm Bug 17234: Need to separate KEY and FOREIGN KEY checks 2017-01-12 12:43:10 +00:00
ItemCirculationAlertPreference.pm Bug 15407: Koha::Patron::Categories - replace C4::Category->all 2016-09-08 13:29:03 +00:00
Items.pm Bug 17512: Improve handling dates in C4::Items 2017-02-14 13:57:49 +00:00
Koha.pm Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories 2016-10-28 16:35:52 +00:00
Labels.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Languages.pm Bug 16770: Remove wrong caching of 3 subroutines in C4::Lancuages 2016-06-24 14:05:56 +00:00
Letters.pm Bug 17962: TT syntax for notices - Prove that ACQ_NOTIF_ON_RECEIV is compatible 2017-02-17 11:43:46 +00:00
Linker.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
Log.pm Bug 14642: Add logging for Holds 2016-08-17 18:43:13 +00:00
MarcModificationTemplates.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Matcher.pm Bug 14629 - Add aggressive ISSN matching feature equivalent to the aggressive ISBN matcher 2016-10-28 11:58:14 +00:00
Members.pm Bug 17588: Koha::Patrons - Move GetMemberIssuesAndFines 2017-01-20 14:25:34 +00:00
Message.pm Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:38 -03:00
NewsChannels.pm Bug 16550: Can't set opac news expiration date to NULL, it reverts to today 2016-05-23 17:37:48 +00:00
Output.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Overdues.pm Bug 17196: Move marcxml out of the biblioitems table 2017-01-13 13:49:26 +00:00
Patroncards.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Print.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Record.pm Bug 17196: [QA Follow-up] Adjust some text on marcxml 2017-01-13 13:49:30 +00:00
Reports.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Reserves.pm Bug 18015 - On shelf holds allowed > "If all unavailable" ignores notforloan 2017-02-07 17:51:51 +00:00
Ris.pm Bug 16245: [QA Follow-up] Replace typeofrecord2 by biblevel 2016-10-21 14:51:55 +00:00
RotatingCollections.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Scheduler.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Scrubber.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
Search.pm Bug 17764: (bug 17556 follow-up) Fix search for logged out users and lost items 2016-12-22 20:25:05 +00:00
Serials.pm Bug 17902: Follow-up fixing SQL statement 2017-01-30 13:02:57 +00:00
Service.pm Bug 11559: Supporting changes for Rancor 2015-10-27 12:16:05 -03:00
ShelfBrowser.pm Bug 15758: Koha::Libraries - Remove GetBranches 2016-09-08 14:36:03 +00:00
SMS.pm Bug 13029 : Follow up 2016-12-16 11:33:39 +00:00
SocialData.pm Bug 9978: (followup) Replace license header with the correct license (GPLv3+) 2015-04-20 09:59:43 -03:00
Stats.pm Bug 16011: $VERSION - Remove comments 2016-03-24 17:20:29 +00:00
Suggestions.pm Bug 16325: Do not return all suggestions if search for STATUS='' 2016-05-05 20:46:02 +00:00
Tags.pm Bug 16637: Dependency for C4::Tags not listed 2016-06-10 18:05:10 +00:00
Templates.pm Bug 17982: Fix the use of uniq in sub themelanguage 2017-02-14 14:09:52 +00:00
TmplToken.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TmplTokenType.pm Bug 16011: $VERSION - Remove the $VERSION init 2016-03-24 17:20:28 +00:00
TTParser.pm Bug 14383: C4: Fix some typos (mostly in comments and documentation) 2015-06-22 17:34:45 -03:00
UsageStats.pm Bug 15131: Add AllowItemsOnHoldCheckoutSCO to UsageStats 2016-10-21 17:27:07 +00:00
XISBN.pm Bug 12478: make things using SimpleSearch use the new version 2016-04-26 20:20:07 +00:00
XSLT.pm Bug 18089 - All XSLT testing singleBranchMode = 0 fails to show even if install has only 1 branch 2017-02-14 14:07:02 +00:00