Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from...
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 19 Jun 2014 12:47:15 +0000 (14:47 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Tue, 1 Jul 2014 03:29:29 +0000 (15:29 +1200)
commit6d77304c98e9b4c839b3bcf19e1453a7e6ec8aaa
treeafabc74cc94d64fc3f65dffe798e930afb6c3283
parentb212c4137d8b401073dd0c4d0ab07c12dd0fd224
Bug 11357 - biblioitems.size value not correctly displayed in list emails sent from OPAC and intranet

The size column in biblioitems is a bit problematic when used in TT, because instead of the size value from the biblio column it will give you the size of the variable.

It's currently used in the templates for sending shelves from OPAC and intranet and maybe also in other places:

[% END %]
   [% IF BIBLIO_RESULT.size %]
   , [% BIBLIO_RESULT.size %]
[% END %]

This patch corrects by using item() TT method.
See http://stackoverflow.com/questions/2311303/how-can-i-handle-hash-keys-containing-illegal-identifier-characters-in-template.

Test plan :
In each display :
=> Without this patch you see biblioitems.pages and then a number
=> With this patch you only see biblioitems.pages

- Create a record with biblioitems.pages defined (like "12p") but without biblioitems.size defined
Same for OPAC and intranet :
- Add it to the cart
- Open the cart
- Check the "Title" column
- Click on "More Details"
- Check the "Details" row
- Send the basket via email and check the result
- Add to a list
- Send the list via email and check the result

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Works well!!
Tested on staff & opac, cart & list.
No koha-qa errors

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes QA script and tests.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/basket/sendbasket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/sendshelf.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendbasket.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelf.tt