Koha-clms/serials
Jan Kissig f581158da2
Bug 42844: Fix broken subscription search when using additional fields as seach criteria
This fixes an error when searching for a subscription with an additional field when no result is found by changing the call of SearchSubscriptions to expect an array instead of an hash ref.
Serials.pm, when using filter_by_additional_fields may return an empty array, but the calling function only checked for an hash ref which lead to an error when no result was found.

Testplan:
a) create an additional field for subscriptions: More -> Serials -> Manage subscription fields
   f.e. use an AV CCODE as additional field
   make sure "searchable" is checked
   No subscription should use this additional field by now.
b) go to More -> Serials
c1) if bug 40201 is pushed you can search for that additional field on serials-home
   -> An error stack trace will appear.
c2) otherwise perform an empty search on serials home to end on serials-search. In the search form on the left select that additional field as search criteria.
   -> An error stack trace will appear.
d) add a subscription using that additional field
  -> More -> Serials -> New subscription.
  On step two there is a section for Additional fields. Select f.e. CCODE Fiction
e) redo c1 or c2 using that additonal field value as search criteria.
f) Check that the search result shows your subscription.
g) apply patch and redo c1 or c2 for an additional field value that is not used (f.e. Non-fiction)
h) The search should work now, returning 0 results instead of an error
i) check that searching for a used additional field (f.e. Fiction) still works

Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit a26800691f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2026-07-29 14:42:36 +00:00
..
acqui-search-result.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
acqui-search.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
checkexpiration.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
claims.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
create-numberpattern.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
lateissues-export.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
reorder_members.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
routing-preview.pl Bug 41846: Fix nl2br to happen after html escaping 2026-05-24 13:42:25 +01:00
routing.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials-collection.pl Bug 38009: Add a generate next button in serials receive page 2026-05-24 13:42:50 +01:00
serials-edit.pl Bug 36466: (follow-up) Use NULL for blank planned and published dates instead of today 2026-03-23 10:03:40 +00:00
serials-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
serials-search.pl Bug 42844: Fix broken subscription search when using additional fields as seach criteria 2026-07-29 14:42:36 +00:00
showpredictionpattern.pl Bug 37796: (follow-up) Correct call in showpredictionpattern.pl 2026-01-16 12:59:57 +00:00
subscription-add.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-batchedit.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-bib-search.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-detail.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-frequencies.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-frequency.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-history.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-numberpattern.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-numberpatterns.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
subscription-renew.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
viewalerts.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00