[open-ils-commits] r9245 - in trunk/Open-ILS: src/sql/Pg
web/reports web/reports/xul
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Apr 7 11:34:20 EDT 2008
Author: miker
Date: 2008-04-07 10:57:20 -0400 (Mon, 07 Apr 2008)
New Revision: 9245
Modified:
trunk/Open-ILS/src/sql/Pg/002.functions.config.sql
trunk/Open-ILS/web/reports/oils_rpt_tforms.js
trunk/Open-ILS/web/reports/xul/transforms.js
Log:
add "first word" support -- use for callnumber prefix
Modified: trunk/Open-ILS/src/sql/Pg/002.functions.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.functions.config.sql 2008-04-07 14:56:47 UTC (rev 9244)
+++ trunk/Open-ILS/src/sql/Pg/002.functions.config.sql 2008-04-07 14:57:20 UTC (rev 9245)
@@ -85,5 +85,9 @@
SELECT $1;
$$ LANGUAGE SQL;
+CREATE OR REPLACE FUNCTION public.first_word ( TEXT ) RETURNS TEXT AS $$
+ SELECT SUBSTRING( $1 FROM $_$^\S+$_$);
+$$ LANGUAGE SQL;
+
COMMIT;
Modified: trunk/Open-ILS/web/reports/oils_rpt_tforms.js
===================================================================
--- trunk/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:56:47 UTC (rev 9244)
+++ trunk/Open-ILS/web/reports/oils_rpt_tforms.js 2008-04-07 14:57:20 UTC (rev 9245)
@@ -56,6 +56,11 @@
label : 'First 5 characters (for US ZIP code)'
},
+ first_word : {
+ datatype : [OILS_RPT_DTYPE_STRING, 'text'],
+ label : 'First contiguous non-space string'
+ },
+
/* timestamp transforms ----------------------- */
dow : {
datatype : OILS_RPT_DTYPE_TIMESTAMP,
Modified: trunk/Open-ILS/web/reports/xul/transforms.js
===================================================================
--- trunk/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:56:47 UTC (rev 9244)
+++ trunk/Open-ILS/web/reports/xul/transforms.js 2008-04-07 14:57:20 UTC (rev 9245)
@@ -93,6 +93,11 @@
label : 'First 5 characters (for US ZIP code)'
},
+ first_word : {
+ datatype : [OILS_RPT_DTYPE_STRING, 'text'],
+ label : 'First contiguous non-space string'
+ },
+
/* timestamp transforms ----------------------- */
dow : {
datatype : [ OILS_RPT_DTYPE_TIMESTAMP ],
More information about the open-ils-commits
mailing list