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> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
0eb9edbf22
commit
a74f1dabe2
|
|
@ -74,7 +74,7 @@
|
|||
<optgroup label="Custom search fields">
|
||||
[% FOREACH field IN items_search_fields %]
|
||||
[% marcfield = field.tagfield %]
|
||||
[% IF field.tagsubfield %]
|
||||
[% IF field.tagsubfield.defined AND field.tagsubfield != "" %]
|
||||
[% marcfield = marcfield _ '$' _ field.tagsubfield %]
|
||||
[% END %]
|
||||
<option value="marc:[% marcfield | html %]" data-authorised-values-category="[% field.authorised_values_category | html %]">[% field.label | html %] ([% marcfield | html %])</option>
|
||||
|
|
|
|||
Loading…
Reference in New Issue