[Rt-commit] [rtir] 04/07: Lower-case CF matches to find new CF hash keys
Jim Brandt
jbrandt at bestpractical.com
Tue Jul 2 15:25:59 EDT 2013
This is an automated email from the git hooks/post-receive script.
jbrandt pushed a commit to branch 2.9/update-2.5.1-update-saved-search
in repository rtir.
commit 141eba1eaab6fc5ff65911c0818773a11d558c28
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue Jul 2 14:34:59 2013 -0400
Lower-case CF matches to find new CF hash keys
If you created a search in an earlier RT, it might have CFs that
look like CF.{_RTIR_HowReported}. This will match the case-insensitive
regex, but the matched value in $1 will be 'HowReported' which isn't
the hash key 'howreported'. This results in:
'Use of uninitialized value in substitution iterator'
Lower-case the match so it indexes to the desired hash key.
---
etc/upgrade/2.5.1/update_saved_searches.pl.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/etc/upgrade/2.5.1/update_saved_searches.pl.in b/etc/upgrade/2.5.1/update_saved_searches.pl.in
index 5c6d9c4..0075c83 100644
--- a/etc/upgrade/2.5.1/update_saved_searches.pl.in
+++ b/etc/upgrade/2.5.1/update_saved_searches.pl.in
@@ -75,7 +75,7 @@ while ( my $s = $saved_searches->Next ) {
s/(?<=CustomField\.{)_RTIR_//ig;
s/(?<=CF\.{)_RTIR_//ig;
s/(?<=CustomField\.{)_RTIR_//ig;
- s/\b($special)\b/$special_rename{$1}/ige;
+ s/\b($special)\b/$special_rename{lc($1)}/ige;
}
if ( $old_query ne $content->{Query} || $old_format ne $content->{Format} )
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Rt-commit
mailing list