Bug 21537 - Template error when creating a new order from a suggestion
Summary: Template error when creating a new order from a suggestion
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Nick Clemens
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 19289
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-10 14:50 UTC by Oliver Behnke
Modified: 2019-10-14 19:58 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21537: Fix itemtype processing (1.91 KB, patch)
2018-10-10 15:06 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 21537: Fix typo for options_for_item_types (2.00 KB, patch)
2018-10-12 13:42 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 21537: Fix typo for options_for_item_types (2.06 KB, patch)
2018-10-12 14:13 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Behnke 2018-10-10 14:50:01 UTC
Hi,

we just ran across the following error when creating a new book order based on a suggestion:

> Template process failed: file error - options_for_itemtypes: not found at /usr/share/koha/lib/C4/Templates.pm line 122

Investigating the problem I found a regression in #19289 where a new template processor called "options_for_item_types" got added to intranet-tmpl/prog/en/includes/html_helpers.inc. However, in intranet-tmpl/prog/en/modules/acqui/neworderempty.tt it's called as "options_for_itemtypes". Note the missing underscore in "itemtypes".

Cheers
Comment 1 Nick Clemens 2018-10-10 15:06:36 UTC
Created attachment 80359 [details] [review]
Bug 21537: Fix itemtype processing

To test:
 0 - Set UseACQFrameworkForBiblioRecords to 'Use'
 1 - Define a subfield in the ACQ framework linked to authorised value
 'itemtypes'
 2 - Make sure that field is visible
 3 - Create a purchase suggestion
 4 - Accept it
 5 - Go to Acquisitions
 6 - Find a vendor with an open basket, or create one
 7 - Add to the basket using a suggestion
 8 - Choose the suggestion
 9 - Internal server error
10 - Apply patch
11 - Place order form a suggestion again
12 - Confirm that the field linked to itemtypes shows correctly
Comment 2 Jonathan Druart 2018-10-12 13:42:01 UTC
Created attachment 80477 [details] [review]
Bug 21537: Fix typo for options_for_item_types

To test:
 0 - Set UseACQFrameworkForBiblioRecords to 'Use'
 1 - Define a subfield in the ACQ framework linked to authorised value
 'itemtypes'
 2 - Make sure that field is visible
 3 - Create a purchase suggestion
 4 - Accept it
 5 - Go to Acquisitions
 6 - Find a vendor with an open basket, or create one
 7 - Add to the basket using a suggestion
 8 - Choose the suggestion
 9 - Internal server error
10 - Apply patch
11 - Place order form a suggestion again
12 - Confirm that the field linked to itemtypes shows correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 3 Martin Renvoize 2018-10-12 14:13:56 UTC
Created attachment 80504 [details] [review]
Bug 21537: Fix typo for options_for_item_types

To test:
 0 - Set UseACQFrameworkForBiblioRecords to 'Use'
 1 - Define a subfield in the ACQ framework linked to authorised value
 'itemtypes'
 2 - Make sure that field is visible
 3 - Create a purchase suggestion
 4 - Accept it
 5 - Go to Acquisitions
 6 - Find a vendor with an open basket, or create one
 7 - Add to the basket using a suggestion
 8 - Choose the suggestion
 9 - Internal server error
10 - Apply patch
11 - Place order form a suggestion again
12 - Confirm that the field linked to itemtypes shows correctly

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize 2018-10-12 14:14:43 UTC
Another trivial patch which resolves the problem and causes no regressions.

Passing QA
Comment 5 Nick Clemens 2018-10-15 17:06:04 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize 2018-10-17 10:35:52 UTC
Pushed to 18.05.x for 18.05.05
Comment 7 Fridolin Somers 2018-11-09 08:17:29 UTC
Depends on Bug 19289 not in 17.11.x