From ef74deb399d89171922274272896cfd40f77bc61 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 1 Jul 2017 16:14:03 -0700 Subject: [PATCH] fix links to merged and blocked bugs --- Debbugs/CGI/Bugreport.pm | 4 ++-- debian/changelog | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Debbugs/CGI/Bugreport.pm b/Debbugs/CGI/Bugreport.pm index de7be81..c1d0aaf 100644 --- a/Debbugs/CGI/Bugreport.pm +++ b/Debbugs/CGI/Bugreport.pm @@ -394,7 +394,7 @@ sub handle_record{ # Add links to the cloned bugs $output =~ s{(Bug )(\d+)( cloned as bugs? )(\d+)(?:\-(\d+)|)}{$1.bug_links(bug=>$2).$3.bug_links(bug=>(defined $5)?[$4..$5]:$4)}eo; # Add links to merged bugs - $output =~ s{(?<=Merged )([\d\s]+)(?=\.)}{join(' ',map {bug_links(bug=>$_)} (split /\s+/, $1))}eo; + $output =~ s{(?<=Merged )([\d\s]+)(?=[\.<])}{join(' ',map {bug_links(bug=>$_)} (split /\s+/, $1))}eo; # Add links to blocked bugs $output =~ s{(?<=Blocking bugs)(?:( of )(\d+))?( (?:added|set to|removed):\s+)([\d\s\,]+)} {(defined $2?$1.bug_links(bug=>$2):'').$3. @@ -403,7 +403,7 @@ sub handle_record{ (\d+(?:,\s+\d+)*(?:\,?\s+and\s+\d+)?)} {$1.(defined $3?$2.bug_links(bug=>$3):'').$4. english_join([map {bug_links(bug=>$_)} (split /\,?\s+(?:and\s+)?/, $5)])}xeo; - $output =~ s{([Aa]dded|[Rr]emoved)( indication that bug )(\d+)( blocks )([\d\s\,]+)} + $output =~ s{([Aa]dded|[Rr]emoved)( indication that bug )(\d+)( blocks ?)([\d\s\,]+)} {$1.$2.(bug_links(bug=>$3)).$4. english_join([map {bug_links(bug=>$_)} (split /\,?\s+(?:and\s+)?/, $5)])}eo; # Add links to reassigned packages diff --git a/debian/changelog b/debian/changelog index 05a7e7b..64257c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -55,6 +55,7 @@ debbugs (2.6.0~exp1) UNRELEASED; urgency=low * Include link to the location of the debbugs source (Closes: #721569). * Add envelope_from configuration variable so sites can set a valid return path if the sendmail default is wrong. (Closes: #719205) + * Fix links to merged and blocked bugs. (Closes: #539691) [ Niels Thykier ] * quitcgi() now returns 400/500 status codes instead of 200 (Closes: #584922) -- 2.39.2