From: Thomas Berezansky Date: Fri, 17 Aug 2012 17:57:08 +0000 (-0400) Subject: Simplified pull list: More name options X-Git-Tag: sprint4-merge-nov22~2991 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a1344fa35bd6690e8b9495e54dfa4b1e157cab12;p=working%2FEvergreen.git 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 --- 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 @@ -5212,6 +5212,17 @@ SELECT usr, 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 REGEXP_REPLACE(ARRAY_TO_STRING(ARRAY[ COALESCE(au.family_name, ''), COALESCE(au.suffix, ''), @@ -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, + + + + + + + +