[Rt-commit] rt branch 5.0/fix-delimiter-during-upgrade-in-recipient-list created. rt-5.0.3-84-g99625a5d5c

BPS Git Server git at git.bestpractical.com
Fri Mar 31 19:16:32 UTC 2023


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 5.0/fix-delimiter-during-upgrade-in-recipient-list has been created
        at  99625a5d5c7701895d1fb38844b9f380db6e7aef (commit)

- Log -----------------------------------------------------------------
commit 99625a5d5c7701895d1fb38844b9f380db6e7aef
Author: Blaine Motsinger <blaine at bestpractical.com>
Date:   Tue Aug 23 18:30:08 2022 -0500

    Fix delimiter during upgrade in recipient list
    
    In older RT, the dashboard recipient list supported being delimited
    by semicolon or space.  The 4.4.1 upgrade content step migrates the
    list, but on newer RTs, fails to split the list correctly.
    
    This commit updates the 4.4.1 upgrade content step to correct the
    semicolon and space delimited list to then be correctly split and
    migrated.

diff --git a/etc/upgrade/4.4.1/content b/etc/upgrade/4.4.1/content
index f8083b8ca5..87e0a2d435 100644
--- a/etc/upgrade/4.4.1/content
+++ b/etc/upgrade/4.4.1/content
@@ -19,6 +19,13 @@ our @Initial = (
             my @users;
 
             if ($recipient) {
+
+                # older RTs allowed delimiting the recipient list with semicolon or space, which
+                # were then correctly parsed into multiple addresses.
+                # correct the list here to allow parsing the list in newer RTs.
+                $recipient =~ s/^\s+//g;
+                $recipient =~ s/[;\s]+/,/g;
+
                 for ( RT::EmailParser->ParseEmailAddress($recipient) ) {
                     my ( $email, $name ) = ( $_->address, $_->name );
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list