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)
committerMike Rylander <mrylander@gmail.com>
Mon, 26 Jan 2015 16:45:20 +0000 (11:45 -0500)
commit918a45c11ba949a2ccb01a7718e2cd5a97ec2506
treee3c15e3c405c6ab4323acadfd77dc91ad0420619
parent609db84f0499cf7083b09d1786ace1a60f71986e
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>
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]