Merge pull request #143 from houdiniproject/fix_for_name_export

Exporting names now works correctly if there's a space in the end of …
This commit is contained in:
Eric Schultz 2019-01-30 14:36:23 -06:00 committed by GitHub
commit 2f7ea19622
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -426,9 +426,9 @@ UNION DISTINCT
def self.supporter_export_selections
[
"substring(supporters.name from '^.+ ([^\s]+)$') AS \"Last Name\"",
"substring(supporters.name from '^(.+) [^\s]+$') AS \"First Name\"",
"supporters.name AS \"Full Name\"",
"substring(trim(both from supporters.name) from '^.+ ([^\s]+)$') AS \"Last Name\"",
"substring(trim(both from supporters.name) from '^(.+) [^\s]+$') AS \"First Name\"",
"trim(both from supporters.name) AS \"Full Name\"",
"supporters.organization AS \"Organization\"",
"supporters.email \"Email\"",
"supporters.phone \"Phone\"",