Search fails when using shelving filter in OPAC with no transcendent bib sources
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
EG 3.1+
If your system has no transcendent bib sources, using the shelving location filter in the OPAC will always return zero search results. This is due to a syntax error in the constructed SQL query.
Steps to reproduce:
1. UPDATE config.bib_source SET transcendant = false;
2. Restart services (required due to immutable database function, see below).
3. Do an advanced search in the OPAC using the shelving location filter. The bib search SQL query fails with a syntax error and your search therefore returns zero results.
When you use a shelving location filter in the OPAC, your search query includes this line:
,b_attr AS (SELECT (RTRIM(
This causes a syntax error if b_attrs is an empty string. The value of b_attrs is derived from asset.bib_
A few notes:
- Since the asset.bib_
- Staff client search queries are apparently not affected by the syntax error because they are constructed slightly differently.
- I've only tested on 3.1, but it looks like the asset.patron_
Bug 1744489 sounds similar but is a different issue.