Bug 32302: Hide "ISBN" label when no ISBN data when sending list
authorDavid Cook <dcook@prosentient.com.au>
Wed, 30 Nov 2022 22:52:55 +0000 (09:52 +1100)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Thu, 26 Jan 2023 10:25:05 +0000 (11:25 +0100)
commita813daed5e188e0def6f46c786a202739f847fba
tree7c3cd4484af4b457df254a33e44d096a83bcf637
parentcfb37201db0fbc12b64a51a3fbe5504fb49785f1
Bug 32302: Hide "ISBN" label when no ISBN data when sending list

There is a logic mistake in the opac-sendshelf.tt template where
we test if the "ISBN" key exists in the "BIBLIO_RESULT" hash when
we should really be testing if the arrayref returned by "ISBN" is
empty or not, since that "ISBN" key always exists and contains at least
an empty arrayref.

Test plan:
1. Apply patch and restart your Koha Starman
2. Create a public list containing records with 020 MARC fields and
records without 020 MARC fields
3. View the list in the OPAC
4. Click "Send list" and email it to yourself
5. Note that only records with 020 MARC fields with show "ISBN:"
in the email output

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 44366c09858364ac56fd37b5434bc77e7e48fe94)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 45a53a3d5e12ac9fb2ce016a90cd80895763298b)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit f5ac9b281ef259dfd837178c519a8a83effcb20d)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-sendshelf.tt