]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Refix for bug 25693: more accurate regexp to find duplicates when generating initial...
authordave%intrec.com <>
Fri, 9 Mar 2001 01:29:09 +0000 (01:29 +0000)
committerdave%intrec.com <>
Fri, 9 Mar 2001 01:29:09 +0000 (01:29 +0000)
checksetup.pl

index abc3fea44193dfd3a2f98cefdddb92813d1ae8cc..8a141a0671b371c7540fe899d5c99e025d0bbb9b 100755 (executable)
@@ -2029,7 +2029,7 @@ if (!($sth->fetchrow_arrayref()->[0])) {
        print("Populating duplicates table...\n");
        
        $sth = $dbh->prepare("SELECT longdescs.bug_id, thetext FROM longdescs left JOIN bugs using(bug_id) WHERE (thetext " . 
-               "regexp 'This bug has been marked as a duplicate of') AND (resolution = 'DUPLICATE') ORDER" .
+               "regexp '[.*.]{3,3} This bug has been marked as a duplicate of [[:digit:]]{1,5} [.*.]{3,3}') AND (resolution = 'DUPLICATE') ORDER" .
                        " BY longdescs.bug_when");
        $sth->execute();
 
@@ -2044,9 +2044,9 @@ if (!($sth->fetchrow_arrayref()->[0])) {
 
        foreach $key (keys(%dupes))
        {
-               $dupes{$key} =~ s/.*This bug has been marked as a duplicate of (\d{1,5}).*/$1/sm;
+               $dupes{$key} =~ s/.*\*\*\* This bug has been marked as a duplicate of (\d{1,5}) \*\*\*.*?/$1/sm;
                $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')");
-               #                                                                                BugItsADupeOf   Dupe
+               #                                        BugItsADupeOf   Dupe
        }
        
        $::regenerateshadow = 1;