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

BPS Git Server git at git.bestpractical.com
Tue Aug 23 23:33:29 UTC 2022


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  4c3750037bfcbb482a32cbf09439cdb4e5edc603 (commit)

- Log -----------------------------------------------------------------
commit 4c3750037bfcbb482a32cbf09439cdb4e5edc603
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..e7443e40c4 100644
--- a/etc/upgrade/4.4.1/content
+++ b/etc/upgrade/4.4.1/content
@@ -19,6 +19,14 @@ 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/;/,/g;
+                $recipient =~ s/^\s+//g;
+                $recipient = join ',', split /\s/, $recipient;
+
                 for ( RT::EmailParser->ParseEmailAddress($recipient) ) {
                     my ( $email, $name ) = ( $_->address, $_->name );
 

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list