LP#1414112: avoid excluding record attribute values that contain only blanks
authorGalen Charlton <gmc@esilibrary.com>
Mon, 26 Jan 2015 16:05:10 +0000 (16:05 +0000)
committerDan Scott <dscott@laurentian.ca>
Thu, 5 Mar 2015 17:43:08 +0000 (12:43 -0500)
commit6284c14f4a11b1d46fa305702cfe8e320ad0bfb0
tree88a95913da781422c5ae0a2df8d85c58b947d4a1
parent5635910655efac3b7e08dc91fd8ed14c0389981a
LP#1414112: avoid excluding record attribute values that contain only blanks

Certain record attributes, chiefly the ones whose values comes
from MARC fixed fields and which have a coded value map associated
with them, can have a string consisting of one or more blanks as a
valid value.  Consequently, this patch ensures that
reingest_record_attributes() no longer excludes all attributes that
have blank values from the final attribute list.

This fixes a problem where MARC records with the target audience (008/22)
coded as a blank (unknown or not specified) could no longer be retrieved
using an "audience( )" search filter.

After applying this patch, a reingest of record attributes should be
performed, e.g., by doing

  select metabib.reingest_record_attributes(id)
  from biblio.record_entry
  where not deleted;

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/030.schema.metabib.sql
Open-ILS/src/sql/Pg/t/regress/lp1414112_allow_spaces_as_ff_attr_values.pg [new file with mode: 0644]
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.allow_spaces_as_ff_attr_values.sql [new file with mode: 0644]