[open-ils-commits] r14834 - in branches/rel_1_4/Open-ILS/src: perlmods/OpenILS/Application sql/Pg (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Nov 8 21:03:43 EST 2009
Author: dbs
Date: 2009-11-08 21:03:42 -0500 (Sun, 08 Nov 2009)
New Revision: 14834
Modified:
branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
branches/rel_1_4/Open-ILS/src/sql/Pg/reporter-schema.sql
Log:
Backport minimal fixes from r14825 and r14826 to address ISSN ingest and retrieval bugs
Modified: branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2009-11-09 01:13:30 UTC (rev 14833)
+++ branches/rel_1_4/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm 2009-11-09 02:03:42 UTC (rev 14834)
@@ -706,8 +706,9 @@
}
}
- $string =~ s/(\w+)\/(\w+)/$1 $2/sgo;
- $string =~ s/(\d{4})-(\d{4})/$1 $2/sgo;
+ $string =~ s/(\w+)\/(\w+)/$1 $2/sgo;
+ # Split date ranges and ISSNs on the hyphen
+ $string =~ s/(\d{4})-(\d{3,4}x?)/ $1 $2 /goi;
return NFD($string);
}
@@ -914,8 +915,9 @@
$val =~ s/\pM+//sgo;
$val =~ s/\pC+//sgo;
$val =~ s/\W+$//sgo;
- $val =~ s/(\w+)\/(\w+)/$1 $2/sgo;
- $val =~ s/(\d{4})-(\d{4})/$1 $2/sgo;
+ $val =~ s/(\w+)\/(\w+)/$1 $2/sgo;
+ # Split date ranges and ISSNs on the hyphen
+ $val =~ s/(\d{4})-(\d{3,4}x?)/ $1 $2 /goi;
$ns->value( lc($val) );
push @ns_list, $ns;
Modified: branches/rel_1_4/Open-ILS/src/sql/Pg/reporter-schema.sql
===================================================================
--- branches/rel_1_4/Open-ILS/src/sql/Pg/reporter-schema.sql 2009-11-09 01:13:30 UTC (rev 14833)
+++ branches/rel_1_4/Open-ILS/src/sql/Pg/reporter-schema.sql 2009-11-09 02:03:42 UTC (rev 14834)
@@ -127,7 +127,7 @@
series_statement.value AS series_statement,
summary.value AS summary,
ARRAY_ACCUM( SUBSTRING(isbn.value FROM $$^\S+$$) ) AS isbn,
- ARRAY_ACCUM( SUBSTRING(issn.value FROM $$^\S+$$) ) AS issn,
+ ARRAY_ACCUM( REGEXP_REPLACE(issn.value, E'^\\S*(\\d{4})[-\\s](\\d{3,4}x?)', E'\\1 \\2') ) AS issn,
ARRAY((SELECT DISTINCT value FROM metabib.full_rec WHERE tag = '650' AND subfield = 'a' AND record = r.id)) AS topic_subject,
ARRAY((SELECT DISTINCT value FROM metabib.full_rec WHERE tag = '651' AND subfield = 'a' AND record = r.id)) AS geographic_subject,
ARRAY((SELECT DISTINCT value FROM metabib.full_rec WHERE tag = '655' AND subfield = 'a' AND record = r.id)) AS genre,
More information about the open-ils-commits
mailing list