From: Don Armstrong Date: Thu, 14 Jun 2007 15:55:28 +0000 (+0100) Subject: - Reopen bugs when a bug is found with a version greater than any X-Git-Tag: release/2.6.0~554^2~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f72cf6b9b61afb7fa35887a9e382bacdf4b24434;p=debbugs.git - Reopen bugs when a bug is found with a version greater than any fixed version (closes: #365352) --- diff --git a/debian/changelog b/debian/changelog index 5dbf1f45..72d54119 100644 --- a/debian/changelog +++ b/debian/changelog @@ -186,6 +186,8 @@ debbugs (2.4.2) UNRELEASED; urgency=low - Only mail duplicated recipients once (closes: #172635) - Indicate date of last activity (closes: #207065) - Reorder title (closes: #265267) + - Reopen bugs when a bug is found with a version greater than any + fixed version (closes: #365352) -- Colin Watson Fri, 20 Jun 2003 18:57:25 +0100 diff --git a/scripts/service.in b/scripts/service.in index 3bf7ae6a..a161f89c 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -10,6 +10,7 @@ use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522); use Debbugs::Mail qw(send_mail_message); use Debbugs::User; use HTML::Entities qw(encode_entities); +use Debbugs::Versions::Dpkg; use Debbugs::Config qw(:globals :config); use Debbugs::CGI qw(html_escape); @@ -554,17 +555,16 @@ END # tracking, because a bug may be closed by multiple # people in different branches. Until we have something # more flexible, we set it every time a bug is fixed, - # and clear it precisely when a found command is - # received for the rightmost fixed-in version, which - # equates to the most recent fixing of the bug, or when - # a versionless found command is received. - if (defined $version) { - my $lastfixed = $data->{fixed_versions}[-1]; - # TODO: what if $data->{package} is a source package? + # and clear it when a bug is found in a version greater + # than any version in which the bug is fixed or when + # a bug is found and there is no fixed version + if (defined $version) { addfoundversions($data, $data->{package}, $version, 'binary'); - if (defined $lastfixed and not grep { $_ eq $lastfixed } @{$data->{fixed_versions}}) { - $data->{done} = ''; - } + my @fixed_order = sort {Debbugs::Versions::Dpkg::vercmp($a,$b);} + @{$data->{fixed_versions}}; + if (not @fixed_order or (vercmp($fixed_order[-1],$version) >= 0)) { + $data->{done} = ''; + } } else { # Versionless found; assume old-style "not fixed at # all".