When adding 952$0 Withdrawn to the custom item search fields, the search will lead to no results, even tho there are withdrawn items in the catalog. I haven't been able to verify, but could this be related to withdrawn being a numeric value? It works well for textual fields.
It's a 0 vs undefined coding error in the template. Patch is coming.
Created attachment 94423 [details] [review] Bug 23847: Fix custom item search fields if subfield is '0' The subfield is not used if is false, so if 0. We want to test if the subfield is defined and not an empty string. Test plan: - Define a new custom item search fields using a subfield '0' (withdrawn=952$0 for instance) - Define one which does not have a subfield (control field) - Search items using those newly created fields.
Thx Jonathan!
Created attachment 94983 [details] [review] Bug 23847: Fix custom item search fields if subfield is '0' The subfield is not used if is false, so if 0. We want to test if the subfield is defined and not an empty string. Test plan: - Define a new custom item search fields using a subfield '0' (withdrawn=952$0 for instance) - Define one which does not have a subfield (control field) - Search items using those newly created fields. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Confusing title and test plan. Just figured out how to reproduce by searching on withdrawn in the box below instead of the withdrawn field above it.
Created attachment 95194 [details] [review] Bug 23847: Fix custom item search fields if subfield is '0' The subfield is not used if is false, so if 0. We want to test if the subfield is defined and not an empty string. Test plan: - Define a new custom item search fields using a subfield '0' (withdrawn=952$0 for instance) - Define one which does not have a subfield (control field) - Search items using those newly created fields. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work! Pushed to master for 19.11.00