Bug 10676: Fix behaviour of OpacHiddenItems for items.restricted
authorKatrin Fischer <katrin.fischer@bsz-bw.de>
Fri, 4 Jan 2019 10:11:03 +0000 (10:11 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 25 Feb 2019 13:39:16 +0000 (13:39 +0000)
commitceb74447df18d1fc8dc05b6142a10085d3a67420
treee8408f0e8596254574aa7f2e2e47309d7d2dfaa9
parent02179a9f0543a71489371abf95193d85b2aa5489
Bug 10676: Fix behaviour of OpacHiddenItems for items.restricted

The numerical restricted value was overwritten in GetItemsInfo
with the description. So OpacHiddenItems would only work for
restricted using the description, not the numerical value
of the authorised value like for other similar status fields.

This changes GetItemsInfo to use a separate variable for
the description, as it's already done for notforloan and
changes the template files where the variable is used
accordingly.

To test
- Before applying patch
- Configure OpacHiddenItems with:
  restricted: [1]
- Find a record with more than one item and mark one of the items
  as "Restricted Access"
  (assume standard sample data - check authorised value if status doesn't exist)
- Verify the item is still shown in OPAC.
- Apply patch
- Verify that the item is now hidden
- Verify that the status still displays nicely in the staff detail page
- Delete OpacHiddenItems
- Verify that the status is showing nicely in the OPAC detail page

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 39d2885d1330afe825e1881f5fc8033d459f6006)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Items.pm
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/item-status.inc