From a1344fa35bd6690e8b9495e54dfa4b1e157cab12 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Fri, 17 Aug 2012 13:57:08 -0400 Subject: [PATCH 1/1] Simplified pull list: More name options Because sometimes you don't want the alias to override the entire name. Signed-off-by: Thomas Berezansky Signed-off-by: Bill Erickson --- Open-ILS/examples/fm_IDL.xml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index 0da9abd5a2..3e26497d78 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -5209,6 +5209,17 @@ SELECT usr, ahr.*, COALESCE(acplo.position, acpl_ordered.fallback_position) AS copy_location_order_position, + CASE WHEN au.alias IS NOT NULL THEN + au.alias + ELSE + au.first_given_name + END AS usr_alias_or_first_given_name, + au.first_given_name AS usr_first_given_name, + au.second_given_name AS usr_second_given_name, + au.family_name AS usr_family_name, + au.prefix AS usr_prefix, + au.suffix AS usr_suffix, + au.alias AS usr_alias, CASE WHEN au.alias IS NOT NULL THEN au.alias ELSE @@ -5220,7 +5231,15 @@ SELECT usr, COALESCE(au.first_given_name, ''), COALESCE(au.second_given_name, '') ], ' '), E'\\s+,', ',') - END AS usr_display_name, + END AS usr_alias_or_display_name, + REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[ + COALESCE(au.family_name, ''), + COALESCE(au.suffix, ''), + ', ', + COALESCE(au.prefix, ''), + COALESCE(au.first_given_name, ''), + COALESCE(au.second_given_name, '') + ], ' '), E'\\s+,', ',') AS usr_display_name, TRIM(acnp.label || ' ' || acn.label || ' ' || acns.label) AS call_number_label, siss.label AS issuance_label, @@ -5306,7 +5325,15 @@ SELECT usr, + + + + + + + + -- 2.43.2